Problem embedding new IPTC data using -profile
Posted: 2009-04-20T14:45:38-07:00
Hello,
We use IM to update the IPTC caption data in an image, but there is a strange data duplication issues with the other fields.
I am running the latest version of IM on OS X (but the same problem happens in Windows too):
The link below is to one of the JPGs in question.
kitty.jpg (412Kb)
We first extract the profile using:
The resulting file start like this:
(Notice there are only 2 keywords)
We then edit the caption line in the file 'kitty.8BIMTEXT' (we do this in java, but you can use a text editor)
Then we push the new profile back into the photo using:
Now, if you open the file in 'Preview.app' (in OS X), the IPTC Properties says:
Notice that the Byline and the Keywords repeat themselves.
If you extract the 8BIMTEXT again, you should notice that the IPTC block is at the top, and repeated again at the bottom.
I thought it might be appending it to the data already there, but the same thing happens if you first strip the profile, before applying the updated one.
Can anyone shed light on this issue, or recommend another way to update IPTC data (especially the caption) of a jpg?
Many thanks,
Mark
We use IM to update the IPTC caption data in an image, but there is a strange data duplication issues with the other fields.
I am running the latest version of IM on OS X (but the same problem happens in Windows too):
Code: Select all
Version: ImageMagick 6.5.1-3 2009-04-20 Q8
kitty.jpg (412Kb)
We first extract the profile using:
Code: Select all
convert kitty.jpg kitty.8BIMTEXT
Code: Select all
8BIM#1028="IPTC"
2#0="�"
2#120#Caption="Kittens at the GSPCA - looking for a home"
2#80#Byline="Joe O'Shaughnessy"
2#5#Image Name="GSPCA kittens"
2#55#Created Date="20050430"
2#25#Keyword="Kittens"
2#25#Keyword="GSPCA"
...
...
We then edit the caption line in the file 'kitty.8BIMTEXT' (we do this in java, but you can use a text editor)
Then we push the new profile back into the photo using:
Code: Select all
convert kitty.jpg -profile kitty.8BIMTEXT new_kitty.jpg
Code: Select all
Byline: Joe O'Shaughnessy
Joe O'Shaughnessy
Caption / Abstract: Kittens at the GSPCA - looking for a home
Date Created: 20050430
Keywords: Kittens
GSPCA
Kittens
GSPCA
Object Name: GSPCA kittens
If you extract the 8BIMTEXT again, you should notice that the IPTC block is at the top, and repeated again at the bottom.
I thought it might be appending it to the data already there, but the same thing happens if you first strip the profile, before applying the updated one.
Can anyone shed light on this issue, or recommend another way to update IPTC data (especially the caption) of a jpg?
Many thanks,
Mark