I have a set of 16 bit TIFF and need to convert it to 10 bit, take the raw pixel data, then assign the 10 bit raw data
to my company's proprietary video format which is 10 bit.
How do I get the 10 bit raw data using Magick++ (MagickWand implementation is also welcomed) ?
So far I have tried :
1. calling Image::depth() with parameter 10
2. either one of these :
- use Image::getPixels() to get PixelPacket pointer to pixel data
- write to a blob and use Blob::data() to get pixel data
3. do memcpy to my pixel buffer (10 bit Red, Green, Blue) or assign individual pixel color from PixelPacket to my pixel buffer.
The end result looks strange.
The colors do not match the original image. I did not do any color change.
It's not just because Red and Blue swapped. Seems like there is a lot of Mozaic effects.
Celios
Magick++ : How to get 10 bit raw data from 16 bit TIFF
Magick++ : How to get 10 bit raw data from 16 bit TIFF
Last edited by celios on 2007-10-05T18:38:46-07:00, edited 1 time in total.
Re: Magick++ : How to get 10 bit raw data from 16 bit TIFF
There will be some color variation going from 16 to 10 bits since 6-bits is lopped off each color component. After you run your program, write the image to disk to a file called image.tif. Next type
- identify -verbose image.tif
Re: Magick++ : How to get 10 bit raw data from 16 bit TIFF
I used 6.3.4-Q16.
Just now I updated to 6.3.6-Q16.
The identify command confirmed that color depth is 10 bit.
Just now I updated to 6.3.6-Q16.
The identify command confirmed that color depth is 10 bit.