Page 1 of 1

can't extract timecode from DPX header

Posted: 2008-11-27T16:09:10-07:00
by fournij
Hi

I can't extract the time code from the DPX file using the version "ImageMagick-6.4.6-4-Q16-windows-dll.exe"

Code: Select all

string tc;
tc = img.attribute("dpx:television.time.code");
I uninstall this version and put the older version "ImageMagick-6.3.5-8-Q16-windows-dll.exe" with the same DPX files and it's work.

thanks

Re: can't extract timecode from DPX header

Posted: 2008-11-27T17:36:38-07:00
by magick
Unfortunately we cannot reproduce the problem you reported. We modified the Magick++ button demo project to read DPX_10bits_YUV422_cineon_big_endian.dpx and it reported a 09:58:44:14 timecode as expected.

Re: can't extract timecode from DPX header

Posted: 2008-11-28T07:20:36-07:00
by fournij
Hi

I use exactly the same file and in my side it's doesn't work with the current version, but work well with the version 6.3.5 :(

I didn't change my code, just uninstall the version 6.4.6, install the version 6.3.5, recompile my code and run it.

Here is my complete code :

Code: Select all

string tc; 
Image img;

img.read("C:\\DPX_10bits_YUV422_cineon_big_endian.dpx");

img.colorSpace(RGBColorspace);

img.magick("TGA");

img.type(TrueColorMatteType);

img.font("arial");

img.fontPointsize(38);

img.fillColor("white");

img.boxColor("#00000000");

tc = img.attribute("dpx:television.time.code");

img.annotate(tc, "+260+390");

img.write("C:\\result.tga"");
Is the attribute parameter string (dpx:television.time.code) has changed between this two version. Because with version 6.4.6 it return me an empty string :(

Re: can't extract timecode from DPX header

Posted: 2008-11-28T07:49:53-07:00
by fournij
Hi

I tried directly using the command line program identify.exe (version 6.4.6) :

identify -format "%[dpx:television.time.code]" C:\DPX_10bits_YUV422_cineon_big_endian.dpx

and it returns me the timecode !!! 09:58:44:14

So I don't know what's going wrong when I use it via the Magick++ interface (img.attribute("dpx:television.time.code"))... (return empty string)

Could you help me ? please

Re: can't extract timecode from DPX header

Posted: 2008-11-28T09:21:11-07:00
by fournij
Hi again

I did another test (same version 6.4.6) and I add this code :

Code: Select all

string creator
creator = img.attribute("dpx:file.creator");

MessageBox(creator.c_str());
string returned : DVS Clipster

It's return me the right information... so the attribute function seems to work with other attributes, but not, in my case, with dpx:television.time.code attribute


I tried also with the cmd line :

identify -format "%[dpx:file.creator]" C:\DPX_10bits_YUV422_cineon_big_endian.dpx

result : DVS Clipster

I hope this can help you.

Re: can't extract timecode from DPX header

Posted: 2008-11-28T10:37:52-07:00
by fournij
Hi

I found it...

I know now where is the bugg and how to do a workaround.

The complete code was this (sorry I forgot to tell you that I do a resize in sd resolution) :

Code: Select all

string tc;
Image img;
Geometry geometry;

img.read("C:\\DPX_10bits_YUV422_cineon_big_endian.dpx");

img.colorSpace(RGBColorspace);

img.magick("TGA");

img.type(TrueColorMatteType);

img.font("arial");

img.fontPointsize(38);

img.fillColor("white");

img.boxColor("#00000000");

geometry = img.size();

//resize to SD
if((geometry.width() == 1920 && geometry.height() == 1080)||
    (geometry.width() == 1280 && geometry.height() == 720))
{
	geometry.aspect(true);
        geometry.width(720);
	geometry.height(486);
	img.scale(geometry);
}
	
tc = img.attribute("dpx:television.time.code");

img.annotate(tc, "+260+390");

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

but if I put the attribute call before the resize part, it's work :

Code: Select all

string tc;
Image img;
Geometry geometry;

img.read("C:\\DPX_10bits_YUV422_cineon_big_endian.dpx");

img.colorSpace(RGBColorspace);

img.magick("TGA");

img.type(TrueColorMatteType);

img.font("arial");

img.fontPointsize(38);

img.fillColor("white");

img.boxColor("#00000000");

tc = img.attribute("dpx:television.time.code");

geometry = img.size();

//resize to SD
if((geometry.width() == 1920 && geometry.height() == 1080)||
    (geometry.width() == 1280 && geometry.height() == 720))
{
	geometry.aspect(true);
        geometry.width(720);
	geometry.height(486);
	img.scale(geometry);
}

img.annotate(tc, "+260+390");

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

But I still don't know why it's worked with the older version of imagemagick

That's the reason why it work with your button demo.

I hope it will help you...

thanks

I hope

Re: can't extract timecode from DPX header

Posted: 2008-11-28T17:27:28-07:00
by magick
Both of your code snippets works for us. Try downloading ImageMagick 6.4.6-5 sometime tomorrow. Perhaps that will fix the problem you reported.