I want to embed zip archive into a metadata, ideally without encoding into base64. I've tried this command, but it hangs with consuming around 3 gb or ram, when trying to embed 13 mb zip into 6 mb jpeg.
exiftool -Comment<="112PHOTO.zip" DSC00007.JPG
Some other tags simply do not allow me to do that: Not a valid image for IFD0:JpgFromRaw
Is there any compatible tag for this, or ability to override a warning?
Due to the 64 kB segment-size limit on for a JPEG file, any large embedded file like this would need to be broken up.
So how about this instead?:
exiftool "-trailer<=112PHOTO.zip" DSC00007.JPG
The disadvantage of this is that the trailer will be lost if the file is manipulated by basically any other software.
- Phil
thumbnails, previews, etc in jpeg format are stored differently, so they don't need segmenting? Because they are embedded instantly, without noticable overhead.
Among all the variety of tags, there is no support for archives implemented anywhere?
I thought about rarjpegs, didn't know exiftool implemented this idea. I'll try it, thanks
Thumbnails are small enough to fit in the EXIF segment, although multiple EXIF segments are possible, they aren't common or widely supported. Previews are usually stored in the trailer with the MPF technique.
I could look into why spitting a 13 MB COM segment takes so long, but honestly I don't know if it is worth the effort because I don't think that storing binary data in a text field is a good idea.
- Phil
Quote from: megapro17 on March 22, 2025, 09:50:27 AMAmong all the variety of tags, there is no support for archives implemented anywhere?
No. Other than Phil's suggestion, the best you could try to do is Base64 encode it and stick it in an XMP field, as XMP can be split across multiple JPEG blocks.