Posted on 2006-02-23 16:32:25-08 by 00coday
problem with IPTC Caption-Abstract field output
I am having a problem pulling the Caption-Abstract IPTC field out of an image.

I should be getting:
030328-N-5362A-010
Polish Special Operations Forces (GROM) during boarding operations in the port of Umm Qasr. The GROM participated in coalition naval forces efforts to clear southern Iraqi waterways of mines and rogue vessels to make way for the arrival of humanitarian relief shipments March 28, 2003. Operation Iraqi Freedom is the multi-national coalition effort to liberate the Iraqi people, eliminate Iraq's weapons of mass destruction and end the regime of Saddam Hussein. (U.S. Navy photo by Photographer's Mate 1st Class Arlo K. Abrahamson)
(RELEASED)

But I am getting:
Polish Special Operations Forces (GROM) during boarding operations in the port of Umm Qasr. The GROM participated in coalition naval forces efforts to clear southern Iraqi waterways of mines and rogue vessels to make way for the arrival of humanitarian relief shipments March 28, 2003. Operation Iraqi Freedom is the multi-national coalition effort to liberate the Iraqi people, eliminate Iraq's weapons of mass destruction and end the regime of Saddam Hussein. (U.S. Navy phot(RELEASED)grapher's Mate 1st Class Arlo K. Abrahamson)

Notice toward the end the (RELEASED) text has been shifted. Could this be due to the cariage returns being stored in the data.

The subject image can be found at:
http://o-day.net/sample/10000002.JPG

Any Thoughts?
Direct Responses: 1841 | Write a response
Posted on 2006-02-23 16:42:49-08 by exiftool in response to 1840
Re: problem with IPTC Caption-Abstract field output
Yes. Your problem is linefeeds. The caption in your sample uses 0x0d characters for the linefeed. This is the Macintosh standard. Your PC would of course prefer 0x0d followed by 0x0a. And in the Unix world, it is 0x0a alone.

You will have to convert the linefeeds for the specific platform you are using.
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.