ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: hybra on September 13, 2018, 07:04:21 AM

Title: Problem with embedding different thumbnail
Post by: hybra on September 13, 2018, 07:04:21 AM
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.

Title: Re: Problem with embedding different thumbnail
Post by: hybra on September 14, 2018, 11:21:46 AM
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
Title: Re: Problem with embedding different thumbnail
Post by: StarGeek on September 14, 2018, 12:41:40 PM
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.
Title: Re: Problem with embedding different thumbnail
Post by: Phil Harvey on September 17, 2018, 08:06:09 AM
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