Add meta entry to jpg (img) files

I created a simple page who, with drag and drop create a new image and place the two dropped files into one and save it as jpg (or whatever).

The specs for an image is in the screen shot below (Preview / macOS).

I want to add a meta with the name of the two original file names in it, but I do not know how to do that by code.

Preview (apparently) allow something, mut manually.

Do not ask me from where the TIFF entry comes because I do not know.
My code create a Picture and print the two files in it, then save it to disk.

In the past when I’ve needed to write image metadata I shelled to exiftool. MBS has ExifTagsMBS but that is mostly for reading.

There is an entry in the Xojo Blog, but only for read them:

Looking into this sparked some curiosity and I have spent the last two days working on native xojo code to read/write exif metadata, and I now understand why there is not much out there for writing. This is a royal PITA.

I’m doing it all with memoryblocks. I still have a ways to go and my brain hurts so I’m calling it a night. No promises that I’ll end up with anything workable because I don’t know how much more time I can give it, but I’m trying.


Here is some mostly-working Exif Read code.

I’m still struggling with writes. Getting the data types correct for each field is a pain and one mistake corrupts the whole tag, which can corrupt the whole file. Working on it, but no promises.