Bug 110038 - exif from files jpeg created by Pentax istds not readable in konqueror though it is in showimg and gimp
Summary: exif from files jpeg created by Pentax istds not readable in konqueror though...
Alias: None
Product: kfile-plugins
Classification: Applications
Component: jpeg (show other bugs)
Version: unspecified
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Carsten Pfeiffer
: 132168 (view as bug list)
Depends on:
Reported: 2005-08-02 17:55 UTC by thomazeauyves
Modified: 2006-11-25 19:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:

An example of a file jpeg with no readable exif (152.43 KB, image/jpeg)
2005-08-02 18:04 UTC, thomazeauyves
the patch to correct this bug (839 bytes, patch)
2005-12-09 12:35 UTC, Loïc Brarda

Note You need to log in before you can comment on or make changes to this bug.
Description thomazeauyves 2005-08-02 17:55:13 UTC
Version:            (using KDE KDE 3.4.0)
Installed from:    Debian stable Packages
OS:                Linux

all my pictures taken with a pentax ist ds have no exif inofrmations in konqueror .
This does not happen with the nikon coolpix 4500 ,my other camera and the sofwares gimp showimage and exiftags can read and display the exif informations so that i know these infos are well generated by the camera ....
A curious fact :after i open one of these pictures and save it with the gimp ,the informations are displayed well in konqueror...
i am very unpleased with this because i have a lot of pictures to sort with kimbada and it just does not work .
Comment 1 thomazeauyves 2005-08-02 18:04:00 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
Comment 2 Loïc Brarda 2005-12-09 12:35:39 UTC
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)
Comment 3 Tommi Tervo 2006-08-18 09:20:57 UTC
*** Bug 132168 has been marked as a duplicate of this bug. ***
Comment 4 Martin Koller 2006-11-25 19:09:12 UTC
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;