converting 16-bit grayscale to 8-bit
Posted: 2010-03-17T13:51:32-07:00
I'm trying to convert a 16-bit grayscale .tif image (intensity min, max: 0, 4095) down to an 8-bit grayscale .tif (or .png), but naively using -depth 8 isn't working and results in an image with too much missing information.
For example:
Orig.tif has up to 4095 unique color values.
--> creates a 16-bit version of orig.tif that looks very close to the original, but only has 256 unique color values. This is what I want, but with 8-bit quality.
--> poorly dithered 8-bit version. 
I've tried a lot of things with the same result. The part that gives me some concern that this may be a bug is that when I try to convert the dithered.tif using -depth 8 it is the same as out.tif.
Any assistance would be greatly appreciated!
~Cameron
The images:
http://dl.dropbox.com/u/222088/orig.tif
http://dl.dropbox.com/u/222088/dithered.tif
http://dl.dropbox.com/u/222088/out.tif
Version: ImageMagick 6.5.8-2 2010-02-22 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Features: HDRI OpenMP
For example:
Orig.tif has up to 4095 unique color values.
Code: Select all
convert orig.tif -fx 'intensity/16' dithered.tif
Code: Select all
convert orig.tif -depth 8 new.tif

I've tried a lot of things with the same result. The part that gives me some concern that this may be a bug is that when I try to convert the dithered.tif using -depth 8 it is the same as out.tif.
Any assistance would be greatly appreciated!
~Cameron
The images:
http://dl.dropbox.com/u/222088/orig.tif
http://dl.dropbox.com/u/222088/dithered.tif
http://dl.dropbox.com/u/222088/out.tif
Version: ImageMagick 6.5.8-2 2010-02-22 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Features: HDRI OpenMP