We have a process in which we crop a pdf image using Adobe Illustrator. During this process, thumbnail metadata is being added to the image. Later we convert the image to eps. The image looks fine till then. Then we convert the image to tiff using ImageMagick. During this stage, a thumbnail image is getting attached to the top left corner of the original image. Is there a way to remove this thumbnail image?
-
Sounds weird. Could you share an example of your tiff (and probably eps) image? – Yuri Khristich Nov 03 '21 at 13:57
-
Sorry, won't be share the image as it may violate company policy – Shiny S U Nov 15 '21 at 11:14
2 Answers
There are a number of possibilities, depending on what's actually happening and it is hard to tell without seeing your input and output files at each stage along with your actual processing.
Sometimes thumbnails are the first entry in a TIFF, so you might choose to only load from the second entry (counting from zero) onwards in a TIFF onwards:
magick input.tif[1--1] ...
If you can't avoid loading the first/last entry, you could load everything and delete whatever you don't want afterwards. So, if I check an image like this, I will see it has 6 scenes, viz. 0 through 5:
magick identify image.tif
image.tif[0] TIFF 2448x3168 2448x3168+0+0 1-bit Bilevel Gray 283124B 0.000u 0:00.000
image.tif[1] TIFF 2448x3168 2448x3168+0+0 1-bit Bilevel Gray 0.010u 0:00.000
image.tif[2] TIFF 2448x3168 2448x3168+0+0 1-bit Bilevel Gray 0.010u 0:00.000
image.tif[3] TIFF 2448x3168 2448x3168+0+0 1-bit Bilevel Gray 0.010u 0:00.000
image.tif[4] TIFF 2448x3168 2448x3168+0+0 1-bit Bilevel Gray 0.010u 0:00.000
image.tif[5] TIFF 2448x3168 2448x3168+0+0 1-bit Bilevel Gray 0.010u 0:00.000
If I want to delete the first and last entry, before processing the remaining entries, I can do:
magick image.tif -delete 0,-1 -format "Processing scene: %s Resolution: %G\n" -write info: <FURTHER PROCESSING OF EACH PAGE> result-%d.png
Sample Output
magick image.tif -delete 0,-1 -format "Processing scene: %s Resolution: %G\n" -write info: -crop 10x10+0+0 result-%d.png
Processing scene: 1 Resolution: 2448x3168
Processing scene: 2 Resolution: 2448x3168
Processing scene: 3 Resolution: 2448x3168
Processing scene: 4 Resolution: 2448x3168
You can work out if this is the case by examining your image with:
exiftool YOURIMAGE
and looking for "Subfile Type: Single page of multi-page image"tiffinfo YOURIMAGE
and looking for number of entriesmagick identify YOUIRIMAGE
and looking for more than one line of output
Sometimes thumbnails are in the metadata, so you can try stripping these with one of the following:
magick INPUT.JPG -strip RESULT.JPG
jhead -dt YOURIMAGE
exiftool -thumbnailimage= YOURIMAGE
You can also find these with:
exiftool YOURIMAGE
and looking for embedded binary datamagick identify -verbose YOURIMAGE
jhead YOURIMAGE

- 191,897
- 31
- 273
- 432
You can try the below solution:
exiftool -ifd1:all= -m Your_file_name
This is what really helped us.

- 371
- 4
- 25

- 43
- 2
- 5