Re: Problem reading depth 16 gray image.
Bob Friesenhahn <[email protected]> Fri, 13 Aug 2004 13:07:59 -0500 (CDT)
| Newsgroups | gmane.comp.video.graphicsmagick.bugs |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 13 Aug 2004, GianPiero Puccioni wrote: > I have some images in raw format 16 bits per pixel and when I try to > read them with > > gm display -depth 16 -size 1024x1024 gray:b400_02.RAW > > I get a completely black image. The images are fine as I can read them > with a C program I wrote myself to reduce to 8 bits and display them, > but I'd like to do some processing with GM. > > Am I doing something wrong? From looking at the supportive code, I suspect that your GraphicsMagick is built with QuantumDepth=8. It appears that if GraphicsMagick is built with less depth than the image being read, it is likely to produce an all-black image since the input quantums are not down-scaled and therefore will exceed the colormap index range (gray images are read as PseudoClass) and be reset to zero (black). I do plan to substantially re-write the code which supports this so that a QuantumDepth=8 GraphicsMagick can still usefully read 16-bit images (but loosing 8 bits of resolution). Bob ====================================== Bob Friesenhahn [email protected] http://www.simplesystems.org/users/bfriesen ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285