EXIF: UserComment field and the API

dounddound Registered Users Posts: 72 Big grins
As part of my smugmug-integrated application, I'd like to keep a little of my own data along a photo. This means embedding some metadata in the photo.

The simplest way to do this seems to use the EXIF metadata. In particular, it seems like the UserComment EXIF field is an ideal place for custom data. The upside is that it can store an arbitrary (typically ASCII though) amount of data. I wasn't planning on storing much data, but it will be more than a few bytes.

Anyway, the only problem with this is that (based on the API's documentation of the getEXIF function) I cannot get the UserComment field with the getEXIF function. That said, I could get it by downloading the image but I expect this will be slower and waste a lot of bandwidth. Since SmugMug strips EXIF from its generated images (Small, Medium, ...) I cannot even just download the low-resolution copy of the image - I have to go with the original :(.

Is there a good way to get this UserComment field without downloading the entire image?

If not, then it seems like I could hijack the Model field of the EXIF data. After all, that field can contain all the data I want (in ASCII form) and SmugMug's getEXIF call can retrieve its value for me. Better yet, if I put the data inside HTML comment tags, then it doesn't even mess up the Photo Info popup which SmugMug has (assuming a prefix my data with the original value of the field).

I guess this hack will do but do let me know if you can think of a cleaner way of doing it. (For the moment, I'll celebrate being able to do it at all :ivar)

Question #2: Can I ask SmugMug to just send me a particular EXIF field rather than the entire thing? I guess it isn't too much overhead to just send the entire thing, but I figured it was worth a shot to ask :).
Sign In or Register to comment.