Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thumbnail added on the converted image #6909

Open
bncdemo opened this issue Dec 1, 2023 · 12 comments
Open

Thumbnail added on the converted image #6909

bncdemo opened this issue Dec 1, 2023 · 12 comments

Comments

@bncdemo
Copy link

bncdemo commented Dec 1, 2023

ImageMagick version

7.1.1

Operating system

Windows

Operating system, version and so on

Win10

Description

Hi,

When I convert eps to png, there is a thumbnail at the left top corner, partially covering the main image.
How to remove the thumbnail?

Steps to Reproduce

command:
-colorspace sRGB -density 300 xyz.eps -background white -flatten -resize 500 -strip -units pixelsperinch xyz.png

Images

No response

@fmw42
Copy link

fmw42 commented Dec 1, 2023

Please post your input EPS image

@bncdemo
Copy link
Author

bncdemo commented Dec 1, 2023

Please post your input EPS image

There is thumbnail in the eps, but why does this not create problem anywhere else?
Why -strip does not work? (https://www.imagemagick.org/discourse-server/viewtopic.php?t=13730)
Why ghostscript converter (gswin64c) never do this?
I tried multiple eps, and all have a thumbnail in the corner using imagemagick convert.

@fmw42
Copy link

fmw42 commented Dec 1, 2023

You have not posted your EPS as requested! Please do so.

@bncdemo
Copy link
Author

bncdemo commented Dec 1, 2023

@fmw42
Copy link

fmw42 commented Dec 1, 2023

I do not have an account and do not want to. If you already have access, please get one and post it here. You may need to zip it first.

@bncdemo
Copy link
Author

bncdemo commented Dec 1, 2023

There is no account, click on the download button. As I wrote every eps has thumbnail, and convert just add that to the image without asking.

@fmw42
Copy link

fmw42 commented Dec 1, 2023

All I see are ads and other software to sign up. Just download one yourself and attach so we know we get the right image.

@snibgo
Copy link

snibgo commented Dec 1, 2023

IM can see two image in that file.

magick "online advertising icon 03.eps" info:

magick: Invalid TIFF directory; tags are not sorted in ascending order. `TIFFReadDirectoryCheckOrder' @ warning/tiff.c/TIFFWarnings/958.
online advertising icon 03.eps[0] EPT 1024x927 1024x927+0+0 16-bit ColorSeparation CMYK 3.62119MiB 0.000u 0:00.000
online advertising icon 03.eps[1] TIFF 1024x927 1024x927+0+0 8-bit Palette sRGB 256c 1.81257MiB 0.001u 0:00.001

If you want just the first image, use a [0] suffix:

magick "online advertising icon 03.eps[0]" x.png

@bncdemo
Copy link
Author

bncdemo commented Dec 1, 2023

That second TIFF 8bit 256c is clearly named as thumbnail in the eps, so the bug report is:
For EPS file format, detect and remove thumbnails by default. Merging the main image with the thumbnail is illogical, nothing else doing that.

@snibgo
Copy link

snibgo commented Dec 1, 2023

... nothing else doing that.

IM delegates the rasterization to Ghostscript, which is returning the two images. As far as I know, Ghostscript doesn't have an option to ignore thumbnails.

@urban-warrior
Copy link
Member

Try this command:

magick -colorspace sRGB -density 300 "xyz.eps[0]" -background white -flatten -resize 500 -strip -units pixelsperinch xyz.png

@bncdemo
Copy link
Author

bncdemo commented Dec 15, 2023

... nothing else doing that.

IM delegates the rasterization to Ghostscript, which is returning the two images. As far as I know, Ghostscript doesn't have an option to ignore thumbnails.

Do you see preview on this conversion:
C:\Program Files\gs\gs10.02.1\bin\gswin64c.exe -sDEVICE=png16m -dFitPage -g500 -sOutputFile=output.png input.eps
Ghostscript does not have option for this, the preview ignored by default. 🧐

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants