[magick-users] Converting 16-bit GRAY files to 8 bits
Robert Funnell
robert.funnell at mcgill.ca
Mon Feb 2 10:43:37 PST 2009
On Mon, 2 Feb 2009, Fred Weinhaus wrote:
> see http://www.imagemagick.org/Usage/formats/#png_formats
Thanks for the pointer. From what I see there, it seems that IM
doesn't support 16-bit grey-scale PNG, which is fine with me since
that's not what I wanted anyway.
> also -depth 8
This doesn't seem to be necessary if IM doesn't support 16-bit PNG,
and in any case I need '-depth 16' on the command line to specify the
depth of the input raw image.
I did try '-type GrayScale' as suggested for 8-bit grey-scale but it
didn't solve my original problem, which is that the high-order bytes
of the 12-bit input pixels are ignored when I RightShift to try to
convert from 12 bits to 8 bits.
- Robert
>> The 12 bits are indeed right shifted in their 16-bit representation.
>> What I wanted to do was to right shift the 12 bits into an 8-bit value
>> for use in an 8-bit PNG.
>>
>> In looking into this further in response to your response, I've
>> discovered that PNG does support 16-bit greyscale, but I don't want
>> that. I've tried some additional manoeuvres but without success, and I
>> haven't figured out how to tell IM whether to produce 8-bit or 16-bit
>> PNG.
More information about the Magick-users
mailing list