16
Jul
08

IPTC parser

To store the caption in the image, I decided to use the IPTC metadata headers. As a test, I use IrfanView to add a caption in the IPTC data of an image taken by my camera, and put the SD card back. The camera displayed the image normally. Sanity check passed.

Next I looked for a IPTC library in C. libiptcdata seemed to fit the bill, so I got it and tried to integrate it with CHDK. I tried compiling it separately, moved it into CHDK, and neither worked. It gave me trouble with stdarg.

Frustrated, I did a hex dump of the JPEG file. The data format did not look too complicated. I then found an excellent article describing the layout for the IPTC header. Equipped with that, I wrote my own code to extract the caption field out of the IPTC header. And it worked! Very very exciting.


0 Responses to “IPTC parser”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


 

July 2008
S M T W T F S
     
 12345
6789101112
13141516171819
20212223242526
2728293031  

Archives

free counter statistics

Follow

Get every new post delivered to your Inbox.