For some coding I would like to do the following:
- Read .tif file
- Convert to .bmp with 256 colours (got this from paint, can't find it in matlab!)
- Convert to .bmp with 24-bit (normal conversion to .bmp is 24-bit, this works)
The problem is within step 2. I need this step since it reduces the image quality and therewith it makes the section colors less advanced. With this a section will have the same value as it should instead of 4 types of dark blue'ish which you can't see with the bare eye.
Part of the code in which conversion happends:
%Reads image
[XX,map] = imread('Test_Script.tif');
%Convert to 256 bmp?
%Write image first if needed
%imwrite()
%Read new image
%[ZZ,map] = imread()
%Converts to rgb 8-bit
YY=ind2rgb8(XX,map);
%writes image
imwrite(YY, map, 'Test_Script_new.bmp','bmp');
Well I can't figure it out, maybe you have an idea?
Try the following: