How to copy unknown trailer MakerNotes from one file to another?

Started by wasco, August 12, 2017, 09:06:27 AM

Previous topic - Next topic

wasco

I have a Samsung Gear 360 camera, and it makes surprisingly good quality 360° pictures, which is very fun for holiday pictures. I edit the best ones with Photoshop/Lightroom, just some minor curves and color correction as not to mess up the stitch line. I am also experimenting with adding captions directly on the images. I export them under the same name, in a different folder.

I was trying to copy all metadata from the original files back over to the new files, but somehow, the Samsung Gallery app on my Samsung phone did not recognise them as 360° images. That means I can't open them directly from the phone gallery app, and also that I need to manually select '360' for each image when viewing them in the Gear VR headset. As you can imagine, this gets old real quick. Mind that the usual metadata (Projection Type, Use Panorama Viewer, ...) that deals with this for most other applications (eg. Facebook, Google Photos, Flickr, ...) is solid. It looks like Samsung has it's own proprietary way of identifying 360 images.

Example:



It took me a while to figure out what was going on, but by comparing a few files in a HEX editor, I found some extra trailer data on the originals that wasn't present in the new files. When I manually copied the extra trailer metadata from an original image to a new image with the HEX editor, the Samsung Gallery instantly recognised it as being 360.


I can see the extra tags when I use the command exiftool -G -u ori.jpg


[MakerNotes]    Time Stamp                      : 2017:07:23 15:24:30+02:00
[MakerNotes]    Samsung Trailer 0x0a50 Name     : Jpeg360_2D_Info
[MakerNotes]    Samsung Trailer 0x0a50          : (Binary data 9 bytes, use -b option to extract)


Is there any way to also copy this data from my originals to the new images? I don't need to alter the data in any way, just copy it over. Can't seem to find the right command to do this with exiftool. I tried exiftool -tagsfromfile ori.jpg -makernotes -make -model dst.jpg , but no success. It copies all MakerNotes, but not the trailer MakerNotes.


I have an original image available here if that helps: https://dl.dropboxusercontent.com/u/7016224/ori.jpg

Phil Harvey

Sorry, but the Samsung trailer isn't current writable. :(

See here for a list of ExifTool's capabilities for JPEG images.

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

wasco


wasco

What I was trying to say is that I don't understand why a straight bit-per-bit copy isn't something you would consider here?

something like -rawtrailer to explicit permit the engine to do a raw copy/replace of the trailer data after the final jpeg EOF segment (FF D9).
exiftool -tagsfromfile -rawtrailer ori.jpg -makernotes -make -model dst.jpg

Phil Harvey

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

Jaff

Quote from: wasco on August 12, 2017, 04:34:14 PM
ok, but why? It seams like a simple copy-paste ?

Your wish (and mine) was fulfilled with the new version 11.87