if true % code data_test= [1 2 3 4; 2 5 0 6; 4 10 0 3; 5 8 6 14]; imwrite((data_test),'clown.png'); s=imread('clown.png') end run the code above,i get that s =
255 255 255 255255 255 0 255255 255 0 255255 255 255 255
If i turn the data type of data_test to uint8,(imwrite(uint8(data_test),'clown.png');) the result of s is same as data_test. why the input of imwrite must turn to uint8? thank you very much.
Best Answer