How to preserve color palette when resizing
Posted: 2007-01-17T15:20:36-07:00
I typically keep images of maps and things as tifs with 8-bit color, with an optimized palette.
I do this through corel photo paint.
Many times, I want to resize a map or photo by 50%. I am using convert.exe so I tried:
convert USGS.tif -resize 50%% -compress rle USGSsmaller.tif
The %% is because I am running from a windows batch file, it works fine with other operations.
The result of the resize is the colorspace gets set to 48 bit, and the image is huge. So I tried:
convert USGS.tif -resize 50%% -colors 256 -compress rle USGSsmall.tif
with very bad results, mostly blue pixels, ugly.
Is there something I need to do to resize, while keeping the palette intact, or some other way to end up with 8bit optimized palette?
I don't mind if it makes the 48bit , then converts to 8 bit, I just dont know how to do it. -colors 256 is not doing it.
thanks
I do this through corel photo paint.
Many times, I want to resize a map or photo by 50%. I am using convert.exe so I tried:
convert USGS.tif -resize 50%% -compress rle USGSsmaller.tif
The %% is because I am running from a windows batch file, it works fine with other operations.
The result of the resize is the colorspace gets set to 48 bit, and the image is huge. So I tried:
convert USGS.tif -resize 50%% -colors 256 -compress rle USGSsmall.tif
with very bad results, mostly blue pixels, ugly.
Is there something I need to do to resize, while keeping the palette intact, or some other way to end up with 8bit optimized palette?
I don't mind if it makes the 48bit , then converts to 8 bit, I just dont know how to do it. -colors 256 is not doing it.
thanks