pyexiv2 gives this Warning: JPEG format error, rc = 5

Bug #323708 reported by Joerg Beyer
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyexiv2
Fix Released
High
Olivier Tilloy

Bug Description

This may be a bug or a broken jpeg - the jpeg is unmodified from my camera.

reading the metadata on a jpeg from my canon eos 450d gives this warning:

Warning: JPEG format error, rc = 5

I can trigger this with the following code (readMetadata triggers the warning):

python -c 'import pyexiv2 ; i = pyexiv2.Image("IMG_0585.JPG") ; i.readMetadata()'
Warning: JPEG format error, rc = 5

The image is attached to this report.

I tracked this bug back to libexiv2.so.4 and reported it against exiv2 - see http://dev.exiv2.org/issues/show/607

With a current libexiv2, this is fixed. Are there pyexiv packages available, that use libexiv2.so.5 form exiv2 version 0.18 (instead of 0.17)?

Revision history for this message
Joerg Beyer (j-beyer) wrote :
Revision history for this message
Olivier Tilloy (osomon) wrote :

Version 0.2, currently under development, is compiled against libexiv2 0.18, and should therefore fix this bug.

Changed in pyexiv2:
assignee: nobody → osomon
importance: Undecided → High
milestone: none → 0.2
Revision history for this message
robinmills (robinmills) wrote :

I am unable to reproduce this on Mac or Windows with pyexiv2 0.1.3 built with exiv2 0.18 - so perhaps this issue has been resolved with by exiv2 0.18.

The build is available (Mac/Universal and Windows for Python 2.6) for download from:
http://clanmills.com/files/pyexiv2-0-1-3+exiv2-0-18.zip

exiv2 is now at 0.18.2 - however this version has API changes which prevent pyexiv2 from simply be recompiled. I'm willing to undertake the task to upgrade the pyexiv2 code to support 0.18.2 - however I'd like the team to agree to me undertaking this work.

Revision history for this message
Olivier Tilloy (osomon) wrote :

pyexiv2 0.1.3 is compiled against libexiv2 0.18, which fixes the issue, as confirmed by Joerg and Robin.

Changed in pyexiv2:
milestone: 0.2 → 0.1.3
status: New → Fix Released
Revision history for this message
Olivier Tilloy (osomon) wrote :

@Robin: do you have details on the API changes that prevent pyexiv2 from compiling against libexiv2 0.18.2 ? I haven't tried myself. Porting the code of the 0.1.x branch wouldn't be of much use, since I don't plan to maintain it any longer, however patches against the 0.2 branch are much appreciated!

Revision history for this message
robinmills (robinmills) wrote :

I agree that this bug is fixed in the pyexiv2 0.1.3 + exiv2 0.18.2.

I was mistaken when I thought there was an API change on exiv2 with 0.18.2 which prevented pyexiv2 from building and linking.

I've tested this on Ubuntu 9.04 (Jaunty), MacOS-X 10.5.8 (Leopard) and Windows XP/SP3. 32-bit Universal binaries for Leopard and 32-bit DLLs for Windows can be downloaded from http://clanmills.com/articles/gpsexiftags/ (click link in top right of web page). These binaries were built with pyexiv2 0.1.3 and exiv2 0.18.0. The bug is fixed in the published binaries.

For folks who wish to build libraries for pyexiv2 and exiv2 from source, build notes are provided from the same page on clanmills.com. A modified version of the file SConscript file is provided for building pyexiv2 on Mac and Windows (thanks to help from Rob Wallace).

I'll get round soon to building and publishing 32-bit DLLs and 32-bit Universal binaries with pyexiv2 0.1.3 with exiv2 0.18.2.

And if I can find the time and enthusiasm, I may even build and test 64 bit versions of the libraries for Mac and Windows. No promises.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Robin, that would be great!
I'd like to integrate your patches to the build script in the 0.2 branch, could you maybe file a bug report for the windows/mac build and attach them there?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.