Thread

Posted on Sun Jan 20 03:43:50 2008 by nafai
Extracting binary exif chunk without thumbnail
I am considering using ExifTool for my own online photo gallery (http://nafai.org/photos), but I am missing one feature. I would like to extract raw EXIF data (excluding the thumbnail) to a file and then later use that as input when generating the tags to be displayed. Actually I am planning to store the exif data in a database together with other image info.

I thought I could write like this:

ExifTool -Exif --ThumbnailImage -b DSCF0001.jpg > DSCF0001.exif

but that doesn't seem to work. Anyone have any ideas?

thanks
Direct Responses: 6893 | Write a response
Posted on Sun Jan 20 10:02:29 2008 by bogdan in response to 6892
Re: Extracting binary exif chunk without thumbnail
If I understand correctly: you just wish to extract exif data into some external file, which can be later reused (for examining, writing back to image, etc.)?
If so, then I suggest you use MIE file:

exiftool -o exif.mie -exif:all --makernotes photo.jpg

-this will create exif.mie file, which will contain (only) all exif info from photo.jpg file. Think of mie file as being jpg (or any image file) without containing any image. So, you can read/edit mie using exiftool and even write it back into another image file.

Greetings,
Bogdan
Direct Responses: 6894 | Write a response
Posted on Sun Jan 20 11:41:59 2008 by nafai in response to 6893
Re: Extracting binary exif chunk without thumbnail
Thank you very much for the reply! This was exactly what I was looking for. I actually wanted to keep the makernote information in the output file so I just used it like this:
exiftool -o photo.mie -exif:all photo.jpg

All the information could then easily be extracted from the mie file again by simply writing:

exiftool photo.mie

The information was identical except for one field,

Y Cb Cr Positioning : Co-sited

which became

Y Cb Cr Positioning : Centered

when I ran ExifTool on the mie file. I wonder why.
Direct Responses: 6897 | Write a response
Posted on Sun Jan 20 17:10:16 2008 by exiftool in response to 6894
Re: Extracting binary exif chunk without thumbnail
Thanks Bogdan.

The YCbCrPositioning tag is considered "unsafe" to copy because it may affect the way the image is rendered. These "unsafe" tags are listed in the tag name documentation, and must be specified explicitly if you want them copied.

YCbCrPositioning is unique in that as well as being "unsafe", it is also a required tag according to the EXIF specification. Currently ExifTool sets this to "Centered" by default if not specified. This is why you get a different value for this tag.

Perhaps in a future release I will come up with a better way to handle this.

- Phil
Write a response