can't extract timecode from DPX header

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
fournij

can't extract timecode from DPX header

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: can't extract timecode from DPX header

Post 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.
fournij

Re: can't extract timecode from DPX header

Post 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 :(
fournij

Re: can't extract timecode from DPX header

Post 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
fournij

Re: can't extract timecode from DPX header

Post 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.
fournij

Re: can't extract timecode from DPX header

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: can't extract timecode from DPX header

Post 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.
Post Reply