conflict between various library to process EXIF data

B

Bram Mertens

Hi,

I posted this to [Image-SIG] a while ago but did not got a reply so I
assume it may not have been the appropriate list. If this is again
not the right list please direct me to the proper list.

How to read and write EXIF data from images has been discussed several
times on the [Image-SIG] list before but I could not find a discussion
on the problem I've run into when using multiple of these.

In short: after adding a comment to the EXIF header using the
setComment(...) and writeMetadata(...) methods of pyeviv2
(http://tilloy.net/dev/pyexiv2/doc/release-0.1.2/pyexiv2.htm) the EXIF
header is altered in such a way that it is no longer possible to read
the EXIF header with EXIF.py.
Furthermore imghdr does not even recognize it as a JPEG anymore.
None

Also the file command in Linux no longer recognizes the EXIF header:
before:
$ file DSC02299.JPG
DSC02299.JPG: JPEG image data, EXIF standard 2.21
after:
$ file 20070623-171634-DSC-H5.jpg
20070623-171634-DSC-H5.jpg: JPEG image data
(Note: part of the processing done is to rename the image based on the
date in the EXIF header)

I switched from EXIF.py to pyexiv2 because the first does not provide
a method to add a comment to the header. Considering the fact that
EXIF.py appears to be no longer under active development I simply
replaced all my calls to EXIF.py with calls to the relevant pyexeiv2
methods. However imghdr is part of the standard library so the fact
it will not recognize the image anymore makes me wonder if maybe
pyexiv2 is doing something "wrong" that might cause other problems
later on.

Can anybody provide insight into this?

Thanks in advance

Bram
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top