google-code-export / camlistore

Automatically exported from code.google.com/p/camlistore
Apache License 2.0
0 stars 0 forks source link

Unable to parse EXIF that exiftool is able to parse #493

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Attached file imports into camlistore 0.8 as an image with correct tagging of 
image size but no other EXIF attributes.  

camtool debug exif 2002-06-28_23.59.15.jpg
gives following error:
exif.Decode: exif: sub-IFD decode failed: tiff: tag format read failed: EOF

Perl-based exiftool is able to extract dozens of attributes correctly:
$ exiftool -a -u -g1 2002-06-28_23.59.15.jpg
---- ExifTool ----
ExifTool Version Number         : 9.46
Warning                         : Bad InteropIFD directory
---- System ----
File Name                       : 2002-06-28_23.59.15.jpg
Directory                       : .
File Size                       : 346 kB
File Modification Date/Time     : 2002:06:28 22:59:15-06:00
File Access Date/Time           : 2014:08:15 22:04:25-06:00
File Inode Change Date/Time     : 2014:08:02 19:33:33-06:00
File Permissions                : rw-rw-r--
---- File ----
File Type                       : JPEG
MIME Type                       : image/jpeg
Exif Byte Order                 : Little-endian (Intel, II)
Image Width                     : 1800
Image Height                    : 1200
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
---- JFIF ----
JFIF Version                    : 1.01
Resolution Unit                 : None
X Resolution                    : 1
Y Resolution                    : 1
---- IFD0 ----
Make                            : EASTMAN KODAK COMPANY
Camera Model Name               : KODAK DX3600 DIGITAL CAMERA
Orientation                     : Horizontal (normal)
X Resolution                    : 300
Y Resolution                    : 300
Resolution Unit                 : inches
Modify Date                     : 2002:06:29 12:12:59
Y Cb Cr Positioning             : Centered
---- ExifIFD ----
Exposure Time                   : 1/500
F Number                        : 3.4
Exposure Program                : Program AE
Exif Version                    : 0200
Date/Time Original              : 2002:06:28 23:59:15
Create Date                     : 2002:06:28 23:59:15
Components Configuration        : Y, Cb, Cr, -
Shutter Speed Value             : 1/512
Aperture Value                  : 3.4
Exposure Compensation           : 0
Max Aperture Value              : 3.2
Subject Distance                : 0 m
Metering Mode                   : Average
Light Source                    : Unknown
Flash                           : No Flash
Focal Length                    : 5.6 mm
User Comment                    :
Flashpix Version                : 0101
Color Space                     : sRGB
Exif Image Width                : 1800
Exif Image Height               : 1200
Exposure Index                  : 100
Sensing Method                  : One-chip color area
File Source                     : Digital Camera
Scene Type                      : Directly photographed
---- Kodak ----
Kodak Model                     : DX3600
Quality                         : Fine
Burst Mode                      : Off
Kodak Image Width               : 1800
Kodak Image Height              : 1200
Year Created                    : 2002
Month Day Created               : 06:28
Time Created                    : 23:59:15.06
Burst Mode 2                    : 0
Shutter Mode                    : Auto
Metering Mode                   : Multi-segment
Sequence Number                 : 0
F Number                        : 3.31
Exposure Time                   : 1/629
Exposure Compensation           : 0
Various Modes                   : 768
Distance 1                      : 12752
Distance 2                      : 12752
Distance 3                      : 12853
Distance 4                      : 12889
Focus Mode                      : Normal
Various Modes 2                 : 0
Panorama Mode                   : 0
Subject Distance                : 0
White Balance                   : Auto
Flash Mode                      : Auto
Flash Fired                     : No
ISO Setting                     : Auto
ISO                             : 100
Total Zoom                      : 1
Date Time Stamp                 : Off
Color Mode                      : Saturated Color
Digital Zoom                    : 1
Sharpness                       : Normal
---- IFD1 ----
Compression                     : JPEG (old-style)
Orientation                     : Horizontal (normal)
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Thumbnail Offset                : 1658
Thumbnail Length                : 26290
---- Composite ----
Aperture                        : 3.3
Date Created                    : 2002:06:28
Image Size                      : 1800x1200
Shutter Speed                   : 1/629
Thumbnail Image                 : (Binary data 26290 bytes, use -b option to 
extract)
Focal Length                    : 5.6 mm
Light Value                     : 12.8

Original issue reported on code.google.com by bruce.el...@gmail.com on 16 Aug 2014 at 5:50

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by bradfitz on 16 Aug 2014 at 5:52

GoogleCodeExporter commented 9 years ago
Currently I'm on the actual dev version and we also can't index any metadata, 
but camtool don't gets the same error:

exif.Decode = &exif.Exif{tif:(*tiff.Tiff)(0xc2081390e0), 
main:map[exif.FieldName]*tiff.Tag{"YCbCrPositioning":(*tiff.Tag)(0xc20804eb40), 
"SubSecTimeDigitized":(*tiff.Tag)(0xc20804f9e0), 
"Sharpness":(*tiff.Tag)(0xc208176120), 
"ISOSpeedRatings":(*tiff.Tag)(0xc20804f200), 
"ApertureValue":(*tiff.Tag)(0xc20804f560), 
"ColorSpace":(*tiff.Tag)(0xc20804fb00), "Model":(*tiff.Tag)(0xc20804e750), 
"Artist":(*tiff.Tag)(0xc20804eab0), "ExifIFDPointer":(*tiff.Tag)(0xc20804ec60), 
"ComponentsConfiguration":(*tiff.Tag)(0xc20804f440), 
"ExposureBiasValue":(*tiff.Tag)(0xc20804f5f0), "":(*tiff.Tag)(0xc20804f950), 
"ExposureMode":(*tiff.Tag)(0xc20804fdd0), 
"WhiteBalance":(*tiff.Tag)(0xc20804fe60), 
"MaxApertureValue":(*tiff.Tag)(0xc20804f680), 
"FlashpixVersion":(*tiff.Tag)(0xc20804fa70), 
"Contrast":(*tiff.Tag)(0xc208176000), "Make":(*tiff.Tag)(0xc20804e6c0), 
"XResolution":(*tiff.Tag)(0xc20804e7e0), 
"FocalLength":(*tiff.Tag)(0xc20804f8c0), "Copyright":(*tiff.Tag)(0xc20804ebd0), 
"ExposureProgram":(*tiff.Tag)(0xc20804f170), 
"DateTimeDigitized":(*tiff.Tag)(0xc20804f3b0), 
"ShutterSpeedValue":(*tiff.Tag)(0xc20804f4d0), 
"SubjectDistance":(*tiff.Tag)(0xc20804f710), 
"FocalPlaneXResolution":(*tiff.Tag)(0xc20804fb90), 
"FocalPlaneYResolution":(*tiff.Tag)(0xc20804fc20), 
"FocalPlaneResolutionUnit":(*tiff.Tag)(0xc20804fcb0), 
"CustomRendered":(*tiff.Tag)(0xc20804fd40), 
"YResolution":(*tiff.Tag)(0xc20804e870), 
"ResolutionUnit":(*tiff.Tag)(0xc20804e900), 
"Software":(*tiff.Tag)(0xc20804e990), "ExposureTime":(*tiff.Tag)(0xc20804f050), 
"FNumber":(*tiff.Tag)(0xc20804f0e0), "MeteringMode":(*tiff.Tag)(0xc20804f7a0), 
"SceneCaptureType":(*tiff.Tag)(0xc20804fef0), 
"Saturation":(*tiff.Tag)(0xc208176090), "DateTime":(*tiff.Tag)(0xc20804ea20), 
"ExifVersion":(*tiff.Tag)(0xc20804f290), 
"DateTimeOriginal":(*tiff.Tag)(0xc20804f320), 
"Flash":(*tiff.Tag)(0xc20804f830)}}
exif.DateTime = 2012-11-04 20:10:04 +0100 CET, <nil>

Also I attached the Image ("Fotolia Sample Image")

Original comment by c.schm...@briefdomain.de on 2 Sep 2014 at 1:16

Attachments:

GoogleCodeExporter commented 9 years ago
We're in the process of updating our 3rd party EXIF library. Please bear with 
us while this is done and I'll come back to check on that issue right after.

Original comment by mathieu....@gmail.com on 2 Sep 2014 at 2:31

GoogleCodeExporter commented 9 years ago
It looks like both these images have broken tiff tags, which is correctly 
resulting in an error from goexif. However, we might try and do something to 
still use whatever non broken info is in these files.

Here's a start of a discussion upstream:
https://github.com/rwcarlsen/goexif/pull/28

Original comment by mathieu....@gmail.com on 23 Sep 2014 at 10:49

GoogleCodeExporter commented 9 years ago
https://camlistore-review.googlesource.com/3962

Original comment by mathieu....@gmail.com on 29 Oct 2014 at 1:13

GoogleCodeExporter commented 9 years ago
fda1399e9c76ae95c72795f7a67c1a829b17abf3

Original comment by mathieu....@gmail.com on 25 Nov 2014 at 4:30

GoogleCodeExporter commented 9 years ago
This issue has moved to https://camlistore.org/issue/493

Original comment by bradfitz on 14 Dec 2014 at 11:37