Page 1 of 1

10 bit per channel raw image

Posted: 2010-01-14T17:47:12-07:00
by mdedmon
So I'm writing some code using Magick++ that has to load and save 10 bit per channel Cineon/DPX images.

Let's say I have some raw image data in memory in a packed RGBA 10/10/10/2 format. Is there a way to directly read this into an image, or do I have to convert it to something more friendly myself?

Something like this doesn't work for me, I get an 'ErrorCorruptImage':

Code: Select all

img.size( Magick::Geometry( m_width, m_height ) );
img.magick( "RGB" ); //RGBA also doesn't work
img.depth( 10 );
Magick::Blob blob( pixels(), size() );
img.read( blob );
Any way to tell it to interpret this packed format correctly?

Re: 10 bit per channel raw image

Posted: 2010-01-14T17:56:22-07:00
by magick
ImageMagick does not support 10/10/10/2 RGBA DPX images. Do you have any DPX images in the 10/10/10/2 RGBA format? If so, post a URL to one or two examples and we'll add support in the next release of ImageMagick.

Re: 10 bit per channel raw image

Posted: 2010-01-14T18:53:48-07:00
by mdedmon
I don't have any problem reading any of the 10-bit Cineon or DPX files that I have using ImageMagick, nor do I have a problem writing out 10-bit Cineon/DPX files that work fine for me. So I don't think that sending you my image files would do you any good.

My problem is really in taking 10/10/10/2 raw image data generated elsewhere, and getting ImageMagick to interpret that correctly through the RAW importer.

Thanks, -m

Re: 10 bit per channel raw image

Posted: 2010-01-14T19:55:56-07:00
by magick
Ok, post a URL to a raw file and another version in a well-know format (e.g. JPEG, PNG). We'll add support to ImageMagick so it can read / write the 10 / 10 / 10 / 2 RGBA raw format.