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");
thanks
Code: Select all
string tc;
tc = img.attribute("dpx:television.time.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"");
Code: Select all
string creator
creator = img.attribute("dpx:file.creator");
MessageBox(creator.c_str());
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"");
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"");