Problem with embedding different thumbnail

Started by hybra, September 13, 2018, 07:04:21 AM

Previous topic - Next topic

hybra

Hello all, this is my first post in this forum so I'll start thanking the Author for bringing us ExifTool!  :)

Mac, High Sierra, exiftool 11.10

I have some problem with embedding a different thumbnail into a jpg file. Sometimes it works ok, sometimes I get one/two grey banding of random length in the thumbnail.

The command I use is:

exiftool '-ThumbnailImage<=th.jpg' -overwrite_original  img.jpg

The console output is
Warning: [minor] Writing multi-segment EXIF - img.jpg
    1 image files updated

Here I attach the three images,
img.jpg.  is the main image file that has its thumbnail being replaced
th.jpg   is the new thumbnail file
out.jpg    is the image with the corrupt thumbnal result I get

Screenshot...png  is how I see the picture in Finders' thumbnail view on Mac.


Note: as I specified before, this problem doesn't always occur.


hybra

I found a possible reason for this: it seems to be happening when the new thumbnail size is >64kb.

Can anyone confirm this? Is there any reason it is like this (memory overflow?), and is there any way to go beyond this limit without the banding issue?

Thanks

StarGeek

You may have to wait a few days for full details from Phil, but I can tell you that the jpeg format does have a block size limit of 64k.  That leads to the warning you get.  Exiftool has to split the data across blocks.  It looks like finder isn't able to deal with this.
* 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).

Phil Harvey

Right.

Multi-segment EXIF is not well supported by other applications (only Adobe products and ExifTool support this as far as I know).  So if you get this message you may very well find that EXIF metadata (ie. the thumbnail image) is not extracted properly by other apps.  To fix this, reduced the size of the thumbnail or other metadata to get the EXIF below 64 kB.

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