jokiazhang / metadata-extractor

Automatically exported from code.google.com/p/metadata-extractor
0 stars 0 forks source link

FujiFilm makernote offset should be relative to the start of the makernote, not the TIFF header #57

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
For a FujiFilm makernote, "... the offset is relative to the start of the 
makernote, not the TIFF header (like everywhere else)..." quoted from the 
comments line 389 in ExifReader.java.  So when calling processDirectory, the 
subDirOffset should be passed instead of the tiffHeaderOffset.  When the 
tiffHeaderOffset is used, the value of the FujiFilm Quality tag (dec 4096, hex 
0x1000) is calculated incorrectly.  If, however, the subDirOffset is used then 
the Quality tag value is correctly parsed.  

com/ drew/ metadata/ exif/ ExifReader.java >> 
line 316: private void processMakerNote >> 
line 392: 
processDirectory(metadata.getOrCreateDirectory(FujifilmMakernoteDirectory.class)
, processedDirectoryOffsets, ifdStart, tiffHeaderOffset, metadata, reader);

Using the code as written, you get output like: 
[FujiFilm Makernote] Quality = P?
or
[FujiFilm Makernote] Quality = 15 00:06
or
[FujiFilm Makernote] Quality = gital Ca

But with the subDirOffset is passed instead of tiffHeaderOffset the output is 
correctly displayed as:
[FujiFilm Makernote] Quality = FINE
or
[FujiFilm Makernote] Quality = BASIC
or 
[FujiFilm Makernote] Quality = NORMAL

These existing sample images can be used to duplicate this:            
FujiFilm FinePix A303.jpg
FujiFilm FinePix F40fd.jpg
FujiFilm FinePix1400Zoom (1).jpg
FujiFilm FinePix1400Zoom (2).jpg
FujiFilm FinePix1400Zoom (3).jpg
FujiFilm FinePix2650.jpg
FujiFilm FinePix40i.jpg
FujiFilm FinePix4900Zoom.jpg
FujiFilm FinePix6800Zoom.jpg
FujiFilm FinePixS5500.JPG

Original issue reported on code.google.com by chelsea....@southsound911.org on 18 Sep 2012 at 9:04

GoogleCodeExporter commented 8 years ago

Original comment by drewnoakes on 16 Oct 2012 at 2:16

GoogleCodeExporter commented 8 years ago

Original comment by drewnoakes on 16 Oct 2012 at 5:43

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 63463f367441.

Original comment by drewnoakes on 1 Jan 2013 at 5:07

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 0b2050dbbf16.

Original comment by drewnoakes on 1 Jan 2013 at 5:07

GoogleCodeExporter commented 8 years ago
Thanks very much for your detailed fix to this issue. It'll be included in the 
next release, 2.7.0, which should go out pretty soon.

If you look at the diff in the sample-images repository, you'll see that the 
fix corrected a few other fields as well. Very nice.

Thanks again and happy new year!

Original comment by drewnoakes on 1 Jan 2013 at 5:09