Convert DPX YUV 4:2:2 to TGA RGB

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?".

Convert DPX YUV 4:2:2 to TGA RGB

Postby fournij » 2008-11-10T12:51:28+00:00

Hello

I want to convert my DPX 10 bit YUV 4:2:2 (cineon big endian) files to TGA (RGB) 8 bit files.

I suppose I have to use the command line program convert.exe, but I don't know which settings to apply.

So when I open the original DPX 10 bit YUV 4:2:2 using imagemagick display.exe program, the image isn't displayed properly, so I think it's a color space issue.

When I use the following command line : convert.exe source.dxp destination.tga the output file is not converted properly; again, it seems to be a color space issue.

Here is the link to the file that I wish to convert (right click and save as...)

http://www.mtlstream.com/DPX_10bits_YUV ... endian.dpx

The file was created using the capture tool within a DVS Clipster and the source was an HDCAM SR tape (1080 59.94i 4:2:2).

thanks
fournij
 
Posts: 31
Joined: 2007-07-23T07:52:22+00:00

Re: Convert DPX YUV 4:2:2 to TGA RGB

Postby fournij » 2008-11-12T04:45:14+00:00

More over, I want to use Magick++ to convert it to TGA RGB

The source code should look like this, but I don't know what fonction to use :

//Need fonction to set the color space to YUV

img.read("source_422.dpx");

//Need something there to change the color space to RGB

img.write("destination_RGB.tga");





Thanks
fournij
 
Posts: 31
Joined: 2007-07-23T07:52:22+00:00

Re: Convert DPX YUV 4:2:2 to TGA RGB

Postby fournij » 2008-11-26T05:23:58+00:00

I read the header of my DPX file :

http://www.mtlstream.com/DPX_10bits_YUV422_cineon_big_endian.dpx

The information in the header _GenericImageHeader._ImageElement[0].Descriptor = 100, that's mean "CbYCrY"

So I try this code to put it to RGB colorspace, Without succes :


Code: Select all
img.read("C:\\DPX_10bits_YUV422_cineon_big_endian.dpx")
img.colorSpace(RGBColorspace);
img.write("C:\\result.tga");



ImageMagick doesn't seems to detect that the input is a CbYBrY (YUV) and it doesn't change the colorspace. Maybe ImageMagick read my DPX file as RGB without using the information in the header.

Is someone can help my about that ?

Should I post this as a bug ?
fournij
 
Posts: 31
Joined: 2007-07-23T07:52:22+00:00

Re: Convert DPX YUV 4:2:2 to TGA RGB

Postby magick » 2008-11-26T06:51:37+00:00

It looks like a bug. We'll have a fix for the problem in the ImageMagick Subversion trunk by sometime tomorrow. Thanks.
User avatar
magick
Site Admin
 
Posts: 5671
Joined: 2003-05-31T11:32:55+00:00

Re: Convert DPX YUV 4:2:2 to TGA RGB

Postby fournij » 2008-11-26T07:53:01+00:00

Thanks

the fix will be probably on the next version ? maybe ImageMagick-6.4.7 for Windows ???

I'm currently using ImageMagick-6.3.7-Q16

Is my code is ok ? :

Code: Select all
img.read("C:\\DPX_10bits_YUV422_cineon_big_endian.dpx")
img.colorSpace(RGBColorspace);

//some other operations like annotate, composite

img.write("C:\\result.tga");



Thanks again
fournij
 
Posts: 31
Joined: 2007-07-23T07:52:22+00:00

Re: Convert DPX YUV 4:2:2 to TGA RGB

Postby magick » 2008-11-26T08:31:16+00:00

Your code looks ok. The patch should be available sometime this weekend in the next point release, ImageMagick 6.4.6-4.
User avatar
magick
Site Admin
 
Posts: 5671
Joined: 2003-05-31T11:32:55+00:00

Re: Convert DPX YUV 4:2:2 to TGA RGB

Postby fournij » 2008-11-27T16:04:44+00:00

Hi

the new version "ImageMagick-6.4.6-4-Q16-windows-dll.exe" solves the problem with the colorspace, but compared to the version "ImageMagick-6.3.5-8-Q16-windows-dll.exe" I can't extract the time code from the DPX file using the code :

Code: Select all
string tc;
tc = img.attribute("dpx:television.time.code");


I'm gonna post a topic about this bugg.

thanks
fournij
 
Posts: 31
Joined: 2007-07-23T07:52:22+00:00


Return to Users

Who is online

Users browsing this forum: Ask Jeeves [Bot], Exabot [Bot], MSN [Bot], Yahoo [Bot] and 4 guests