Does Magick++ allow to read/write exif headers (and query individual exif tags such as exposure time) for JPEG and TIF files?
Thanks,
eastern_strider
Support for EXIF
Re: Support for EXIF
Get EXIF tags with image.attribute("exif:tag") where tag is the EXIF tag you are interested in..
Re: Support for EXIF
Hello,
I'm currently trying to write exif-information into png and tiff images using Magick++.
I managed to write attributes into a tiff image and to read them out, using "display". I can write into the fields "Model", "Copyright" and "Artist". Can I also use custom fields? If yes, can I read them out without using the ImageMagick GUI or other tools?
And how can I write exif tags to and read them from png-images?
I'm new to Exif and ImageMagick.
Thanks!
Marina
I'm currently trying to write exif-information into png and tiff images using Magick++.
I managed to write attributes into a tiff image and to read them out, using "display". I can write into the fields "Model", "Copyright" and "Artist". Can I also use custom fields? If yes, can I read them out without using the ImageMagick GUI or other tools?
And how can I write exif tags to and read them from png-images?
I'm new to Exif and ImageMagick.
Thanks!
Marina
Re: Support for EXIF
ImageMagick treats EXIF as a blob. It does parse the properties but there is no mechanism to update any field other than resolution. You will need to parse/update the blob yourself or use some other program to update the EXIF properties.
Re: Support for EXIF
Thanks for the quick answer!
Could you please describe that a little bit more in detail? What would I have to do if I wanted to create a new field like "IntegrationTime"?
I added this field by
Or should it be
?
Before writing the image to a file I can read this attribute out again by calling
That's fine. But when I read the image from this file the attribute has "gone", the attribute-method returns an empty string.
So, what can I do?
Thanks in advance!
Could you please describe that a little bit more in detail? What would I have to do if I wanted to create a new field like "IntegrationTime"?
I added this field by
Code: Select all
image.attribute("IntegrationTime", "10000");
Code: Select all
image.attribute("exif:IntegrationTime", "10000");
Before writing the image to a file I can read this attribute out again by calling
Code: Select all
std::cout<<image.attribute("IntegrationTime");
So, what can I do?
Thanks in advance!
Re: Support for EXIF
ImageMagick does not update the EXIF blob other than the image resolution and the image orientation fields. You are responsible for parsing an EXIF blob and updating any fields you require. There are plenty of EXIF utilities that you can use to accomplish this. If you want to use Magick++ you would need to extract the EXIF profile as a blob, update it, and inject it back with the exifProfile() method.