Unable to write Orientation tag in E-PL1 ORF files

Started by haunma, July 10, 2010, 08:34:44 PM

Previous topic - Next topic

haunma

I'm using 8.15 on 64-bit Linux (debian squeeze).  When trying to change the Orientation tag in some ORF files from my Olympus E-PL1, I get the following:

haunma@angwin:~/oly$ exiftool -Orientation="Vertical" foo.orf
Error: [minor] Error reading value for ImageProcessingIFD entry 149 - foo.orf
    0 image files updated
    1 files weren't updated due to errors

exiv2 (which just added write support for ORF raw files) also has problems with ORF files from this camera--it seems to be corrupting the OlympusIP table, leading me to wonder if there is a common root cause, something about these files that is not well behaved.

I've placed a sample ORF file at http://www.keteu.org/~haunma/foo.orf

Thanks.


Phil Harvey

Thanks for this report and sample image.

The ImageProcessingIFD entry in question does indeed contain an invalid offset, but this is a "minor" error since it is in the maker notes.  You can use the -m option to ignore minor errors, which will allow you to write the image.  When you do this, the erroneous entry in the ImageProcessingIFD is deleted, but all other valid information should be maintained.

Give this a try and see if any of your Olympus utilities have problems with the image after doing this.  I suspect that they won't care about this entry since it was invalid anyway.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

P.S. Looking at the value of the erroneous offset, it is clear that the camera firmware just forgot to set this value.  The value is zero after adjusting for the relative offsets used by Olympus in this version of their maker notes if you ignore the unsigned integer overflow.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

haunma

Thanks.  I just tried that but I am seeing quite a long diff in the before/after exif dumps:

haunma@angwin:~/oly$ diff 1 2
9,10c9,10
< Exif.Image.StripOffsets                      Long        1  1449472
< Exif.Image.Orientation                       Short       1  top, left
---
> Exif.Image.StripOffsets                      Long        1  1153086
> Exif.Image.Orientation                       Short       1  bottom, left
20c20
< Exif.Image.ExifTag                           Long        1  266
---
> Exif.Image.ExifTag                           Long        1  936
34,35c34,35
< Exif.Photo.MakerNote                         Undefined 1446464  (Binary value suppressed)
< Exif.MakerNote.Offset                        Long        1  3008
---
> Exif.Photo.MakerNote                         Undefined 1151586  (Binary value suppressed)
> Exif.MakerNote.Offset                        Long        1  1358
40c40
< Exif.Olympus2.Equipment                      Long        1  114
---
> Exif.Olympus2.Equipment                      Long        1  4086
65c65
< Exif.Olympus2.CameraSettings                 Long        1  408
---
> Exif.Olympus2.CameraSettings                 Long        1  4630
68c68
< Exif.OlympusCs.PreviewImageStart             Long        1  42048
---
> Exif.OlympusCs.PreviewImageStart             Long        1  5850
125c125
< Exif.Olympus2.RawDevelopment                 Long        1  1122
---
> Exif.Olympus2.RawDevelopment                 Long        1  998876
140c140
< Exif.Olympus2.ImageProcessing                Long        1  1296
---
> Exif.Olympus2.ImageProcessing                Long        1  999082
290d289
< Exif.OlympusIp.0x1104                        Undefined 4608  (Binary value suppressed)
349c348
< Exif.Olympus2.FocusInfo                      Long        1  3798
---
> Exif.Olympus2.FocusInfo                      Long        1  1147140


Collateral damage?   ???

Phil Harvey

#4
It looks like all of the differences are simply different offsets.  When the metadata is rewritten you should expect the offsets to change (see FAQ 13).  Look at the ExifTool Olympus tag name documentation and you will see that Equipment, CameraSettings, etc are just offsets to IFD's in the Olympus maker notes.  Also, the maker notes changed size but this is expected as well.

No damage that I can see, except for the one missing tag, but we already knew about that.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

haunma

Oops, sorry, I jumped the gun.  Thanks for clarifying it for me.