Returned error code

Started by MikeFromMesa, March 06, 2019, 07:58:53 AM

Previous topic - Next topic

MikeFromMesa

About a year ago I needed to learn ExifTool enough to use it to synchronize some gps and other information between raw images and jpgs since my camera (Olympus E-M1 Mk II) only updates the raw gps information and I wanted the jpgs to also have that data. When I finished with the ExifTool wrapper that I used on my machine to display and synchronize exif data I thought I was reasonably familiar with the tool so it was with some surprise yesterday when I kept getting a failure when trying to update some exif data using the Terminal app on my Mac.

The command I entered was the following:

exiftool -FNumber=4.0 /volumes/work/photos/em1x/test.orf

where I am in the ExifTool folder and the specified file exists. I got the following response:

Error: [minor] Undersized IFD0 StripByteCounts (16564244 bytes, but expected 40997760) - /volumes/work/photos/em1x/test.orf
    0 image files updated
    1 files weren't updated due to errors


And I do not know what the error message is trying to tell me. I have retried the command using single and double quotes around the tag part of the command and around the path (although I do not see why either would be necessary) but none of the dozen or so variations I tried worked. I have no idea what the error it is giving me is, so I hoped someone on this forum might be able to help me.

Phil Harvey

Some additional error checking was added to ExifTool.  You can add -m to downgrade this warning and write the ORF, but I thought you wanted to write to JPG files, not ORF.

Note that I don't get this warning with ExifTool 11.29 when writing a sample E-M1mkII ORF I have here.  This warning is an indication that the StripByteCounts stored in the file aren't large enough to cover the size of the image.

- 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 ($).

MikeFromMesa

> You can add -m to downgrade this warning and write the ORF, but I thought you wanted to write to JPG files, not ORF.

Thank you. I will try adding the -m.

I suppose my post was a bit confusing. I originally worked with exiftool specifically to sync my jpgs with the raw gps data, but this particular effort was for something else. In this case I was trying to modify some of the exif data in the raw image itself to answer a question that had arisen about the raw data.

I will try downgrading the warning and see if that helps.

Phil Harvey

You may also try upgrading to the most recent version of ExifTool if you don't have it already.  I remember making changes to these warnings to accommodate some raw file peculiarities.

- Phil

Edit:  Ah, yes.  I see from the revision history that ExifTool 11.15 removed this warning for the ORF's:

Oct. 25, 2018 - Version 11.15
  - Removed "Undersized IFD0 StripByteCounts" minor warning when writing ORF
    files since this is a "feature" of most Olympus models

...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 ($).

MikeFromMesa

Thank you for the information. I will update. The -m "solved" the problem as the warning did not appear and the file got updated properly. I was able to get my question about the raw file answered.

What I still do not understand is what was wrong with the basic command I gave that generated the warning and caused the failure. I assume there was some basic error in the command I used that caused the warning and failure and the -m option only ignored that warning. Was there anything really wrong? And, if so, what, so I don't repeat whatever mistake it was.

Phil Harvey

There was nothing wrong with your command.  The problem is that Olympus isn't following normal TIFF practices for ORF files (although they are TIFF based).  ExifTool does some validity checks for TIFF-format files, but I have since removed one of these checks for ORF files because they were all failing this check.  Of course, the ORF format is proprietary, so Olympus isn't constrained to follow the TIFF specification if they don't want to.

- 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 ($).

MikeFromMesa

Ah. I see. Thank you for taking the time to respond.