I have a code below
clcclear allclose all% a= imread('im16_1a.png');
% I=rgb2gray(a);
I=imread('rice.png');imgTrans = I';% iD conversion
img1D = I(:);% Decimal to Hex value conversion
imgHex = dec2hex(img1D,6);% New txt file creation
fid = fopen('text.txt', 'wt');% Hex value write to the txt file
fprintf(fid,'%s\n',imgHex)% Close the txt file
fclose(fid)winopen('text.txt')
i this i have converted to hexadecimal,i want to write values in imgHex to text file,but wen i write i dont get vales as in imgHex,kindly help
Best Answer