Main Menu

Writeable tabs

Started by MtnBiker, April 23, 2024, 01:47:53 PM

Previous topic - Next topic

MtnBiker

I write to some tags, but others break the writing completely with no errors. I run this via a Ruby gem mini_exiftool, https://github.com/janfri/mini_exiftool. When I try to write to `GPSStatus` nothing get written to the photo file. Without this line the other fields get written.
photo = MiniExiftool.new(fn) # which file is going to be written
photo.instructions = "Some variable 1" # less info but shorter
photo.comment = "A comment" #
photo.GPSStatus = "GPSStatus field test" # With this line nothing gets written
photo.save # write to the file
Any way to determine which fields are writable? The files are jpgs from an OMDS (Olympus) camera.

Phil Harvey

I don't know about the Ruby interface, but the value you are trying to write to GPSStatus is invalid.  It should be either "Measurement Active" or "Measurement Void" (see the GPS Tags documentation).  You seem to indicate that other tags don't get written when you try to write this one.  This is not the normal behaviour of ExifTool, so something must be happening in the Ruby interface.

I don't know what you are trying to get at with the photo.instructions.

The Tag Names documentation lists which tags are writable.

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

StarGeek

Quote from: Phil Harvey on April 23, 2024, 02:07:31 PMYou seem to indicate that other tags don't get written when you try to write this one.  This is not the normal behaviour of ExifTool, so something must be happening in the Ruby interface.

It is something that MiniExiftool is doing. From the link on MiniExiftool under Caveats
QuoteWriting operations are executed on a copy of the original file to have atomic writing: Either all changed values are written or none.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

MtnBiker

Phil
"I don't know what you are trying to get at with the photo.instructions."
Instructions is read by macOS Preview and other apps.

I've got a new camera and am trying to have readily visible the settings on the camera, so I read fields such as "AISubjectTrackingMode" and "DriveMode" that OMDS writes to the files then put them in instructions. What I called "Some variable 1" is a concatenation of those variables.

"'The Tag Names documentation' lists which tags are writable."
That helps.

StarGeek: I don't know what "atomic writing" is but I now get that MiniExifTool is checking for valid data in fields. mini_exiftool is only about 600 lines long and I would assume relies on exiftool to do this.

Long story is I am attempting to find other fields I could write that are shown by programs I use to so I didn't have to stuff too much into "Instructions."  I can of course get the info with (Mini)ExifTool but the info isn't with the photo in the app.

Thank you both. Maybe I know enough now to stay out of trouble.

PS. Couldn't do any of this without ExifTool. Thanks.

Phil Harvey

Quote from: MtnBiker on April 23, 2024, 07:16:00 PM"I don't know what you are trying to get at with the photo.instructions."
Instructions is read by macOS Preview and other apps.

I meant the comment "less info but shorter".  I don't know what that means.  It sounded like you had a problem with this one too?

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