AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
September 2009

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2009.09.10 14:38 "16-bit grayscale tiff to 8-bit grayscale in borland c++ (more info)", by Robert Zermeno
2009.09.11 00:37 "Re: 16-bit grayscale tiff to 8-bit grayscale in borland c++ (more info)", by Robert Zermeno
2009.09.11 01:43 "Re: 16-bit grayscale tiff to 8-bit grayscale in borland c++ (more info)", by Bob Friesenhahn

2009.09.11 01:43 "Re: 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.

Bob
--
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/