Summary: | exif from files jpeg created by Pentax istds not readable in konqueror though it is in showimg and gimp | ||
---|---|---|---|
Product: | [Applications] kfile-plugins | Reporter: | thomazeauyves <yves.thomazeau> |
Component: | jpeg | Assignee: | Carsten Pfeiffer <pfeiffer> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | a.ferretti |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Debian stable | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
An example of a file jpeg with no readable exif
the patch to correct this bug |
Description
thomazeauyves
2005-08-02 17:55:13 UTC
Created attachment 12050 [details]
An example of a file jpeg with no readable exif
I got a very fine view of the infos in showimg but nothing in Konqueror/Kimdaba
.....
Created attachment 13834 [details]
the patch to correct this bug
In the tiff header (of the EXIF APP1 segment), there are 2 bytes (either 'II'
or 'MM') specifying little or big endian followed by two bytes containing
0x002A (fixed value), followed by the 0th IFD offset in 4 bytes. On most JPEG
files, this offset is 8 (the 0th IFD is just following the TIFF header), but it
can be anything.
The kfile_jpeg plugin (in exif.cpp) had that offset fixed at value 8. Now the
value is read and taken into account.
See pages 10 & 11 of the Exif Version 2.2 documentation (www.exif.org)
*** Bug 132168 has been marked as a duplicate of this bug. *** SVN commit 607778 by mkoller: BUG: 110038 Apply patch from Loïc Brarda fixing exif information reading M +4 -3 exif.cpp --- branches/KDE/3.5/kdegraphics/kfile-plugins/jpeg/exif.cpp #607777:607778 @@ -802,15 +802,16 @@ } // Check the next two values for correctness. - if (Get16u(CharBuf+10) != 0x2a - || Get32u(CharBuf+12) != 0x08){ + if (Get16u(CharBuf+10) != 0x2a){ throw FatalError("Invalid Exif start (1)"); } + long IFDoffset = Get32u(CharBuf+12); + LastExifRefd = CharBuf; // First directory starts 16 bytes in. Offsets start at 8 bytes in. - ProcessExifDir(CharBuf+16, CharBuf+8, length-6); + ProcessExifDir(&CharBuf[8+IFDoffset], CharBuf+8, length-6); // This is how far the interesting (non thumbnail) part of the exif went. ExifSettingsLength = LastExifRefd - CharBuf; |