Clipping path when Ghostscript Installed

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Locked
haukemac
Posts: 5
Joined: 2020-03-13T06:52:02-07:00
Authentication code: 1152

Clipping path when Ghostscript Installed

Post by haukemac »

Hello,

I have an EPS with encapsulated TIFF which has a clipping path. The clipping path is shown with the

Code: Select all

identify -verbose
command successfully.
When I additionally install Ghostscript (current or previous release) then the path is no longer found.

This happens on macOS with imagemagick / Ghostscript installed by home-brew. But also happens on a Redhat/Centos installation.

Does anyone have a clue how to make this work?

thanks
hauke

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Clipping path when Ghostscript Installed

Post by snibgo »

What versions of ImageMagick and Ghostscript?

Please link to a sample eps.
snibgo's IM pages: im.snibgo.com

haukemac
Posts: 5
Joined: 2020-03-13T06:52:02-07:00
Authentication code: 1152

Re: Clipping path when Ghostscript Installed

Post by haukemac »

I tried ImageMagick 7.0.10-0 and 7.0.8-64 Q16 x86_64. Ghostscript 9.27 and 9.5

I am looking for a way to upload the image somewhere or is it possible to mail it to you?

br

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Clipping path when Ghostscript Installed

Post by snibgo »

You can upload to anywhere on the internet and paste the link here. But don't use an image-sharing site as these often re-format the file, eg with jpeg compression.
snibgo's IM pages: im.snibgo.com

haukemac
Posts: 5
Joined: 2020-03-13T06:52:02-07:00
Authentication code: 1152

Re: Clipping path when Ghostscript Installed

Post by haukemac »


snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Clipping path when Ghostscript Installed

Post by snibgo »

Your PS file is CMYK. I suggest you tell IM to tell Ghostscript to convert it to sRGB because that also enables a transparent background, which I think you want. Also strip the profile, or you will get a CMYK profile in a sRGB image, which is a bad idea.

Code: Select all

magick -verbose -colorspace sRGB testpic01.ps +profile * out.png
Does that do what you want?
snibgo's IM pages: im.snibgo.com

haukemac
Posts: 5
Joined: 2020-03-13T06:52:02-07:00
Authentication code: 1152

Re: Clipping path when Ghostscript Installed

Post by haukemac »

This results in an error (with current IM and gs):

Code: Select all

 magick -verbose -colorspace sRGB testpic01.eps +profile * out.png
'gs' -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '-r72x72' -g691x922 -dEPSCrop  '-sOutputFile=/var/folders/v2/67xsyttj6bn25hwkfrmhz925c8rzq7/T/magick-24946w6Im0Fl13MJZ%d' '-f/var/folders/v2/67xsyttj6bn25hwkfrmhz925c8rzq7/T/magick-24946glY9rao9hJ7k' '-f/var/folders/v2/67xsyttj6bn25hwkfrmhz925c8rzq7/T/magick-24946iw2fO6ZjgYfC'
/var/folders/v2/67xsyttj6bn25hwkfrmhz925c8rzq7/T/magick-24946w6Im0Fl13MJZ1 PNG 691x922 691x922+0+0 8-bit sRGB 447414B 0.060u 0:00.023
EPS:/var/folders/v2/67xsyttj6bn25hwkfrmhz925c8rzq7/T/magick-24946jznynjY52zJp=>/var/folders/v2/67xsyttj6bn25hwkfrmhz925c8rzq7/T/magick-24946jznynjY52zJp EPS 691x922 691x922+0+0 16-bit sRGB 447414B 0.010u 0:00.001
testpic01.eps EPT 691x922 691x922+0+0 16-bit sRGB 447414B 0.000u 0:00.001
magick: no decode delegate for this image format `' @ error/constitute.c/ReadImage/562.

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Clipping path when Ghostscript Installed

Post by snibgo »

haukemac wrote:no decode delegate for this image format
Do the following work?

Code: Select all

magick rose: x.png
magick rose: x.jpg
magick testpic01.eps x.png
magick testpic01.eps x.jpg
snibgo's IM pages: im.snibgo.com

haukemac
Posts: 5
Joined: 2020-03-13T06:52:02-07:00
Authentication code: 1152

Re: Clipping path when Ghostscript Installed

Post by haukemac »

it creates a white jpg and a transparent png, with no content.

Locked