magick++ 16 bit errors

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
devendra

magick++ 16 bit errors

Post by devendra »

Hello all,

I am using 16 bit ImageMagick. I am using the Magick++ API to read images and get their pixel data to do some image processing.

Is there any way in which I can get 8 bit pixel data. I don't seem to find a method in Image or PixelPacket class to set depth and read 8 bit Pixel data.

Alternatively, I could use 8 bit ImageMagick, but then going forward, I want support for 10 bit.

Regards,
Devendra.
devendra

Re: magick++ 16 bit errors

Post by devendra »

P.S. :

I tried reading the 16 bit values, right shifting them to 8 bits, again left shifting the bits by 8 and writing the file. This results in an error of 1 bit.

-Devendra.
Post Reply