2009.09.11 01:43 "Re: [Tiff] 16-bit grayscale tiff to 8-bit grayscale in borland c++ (more info)", by Bob Friesenhahn
On Thu, 10 Sep 2009, Robert Zermeno wrote:
> So, I would like to know more about some techniques I can use to > scale down. I can already process the image and view it, but the
> grayscale color output is wrong (like I mentioned before, many pixel > values are too white). So, simply converting 2-bytes to 1-byte does
> not do the trick.
This is not my area of expertise. The most obvious thing to do is to obtain the maximum, minimum, and median, values, and then determine a scaling from that. But since it seems that your display device is not ordinary, you may need to build a special color table so that grayscale appears linear on your device.
Images may be linear-light so that they need a gamma mapping applied so that they look correct on computer displays (which display sRGB).
> Would I have to alter the colortable used in my bmp object. Right > now, I only produce a grayscale table starting at R=G=B=0 for 1st,
> then R=G=B=256 for second and +256 for each value up to 256 count.
That sounds odd. Normally for grayscale you want R, G, B to all be set to the same values. Sometimes you might use slightly colored values in order to achieve a dithering effect to expand the effective number of gray shades.
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/