Page 1 of 1
convert eps with clipping path to transparant png
Posted: 2010-07-30T06:54:35-07:00
by vital
I am trying to convert a CMYK eps image with a clipping path to a transparant PNG file, but don't get a good PNG.
I've been reading some posts here and found some similar questions and tried the suggestions, but no results yet...
When i try the simple command:
convert input.eps output.png
the result is a png with a white background, no transparancy
When i add -colorspace RGB
convert -colorspace RGB input.eps output.png
the result is a transparant PNG file in RGB but the colours are really bad
When i try to convert the CMYK to RGB with the -profile option
convert input.eps -profile sRGB.icm output.png or
convert -profile sRGB.icm input.eps output.png
the colour is RGB and looking good but the transparancy has disappeared
Combining the -profile and -colorspace option doesn't give a better result
Also tried a lot of combinations with the -clip option, but never got any output file
Anyone suggestions?
IM version 6.6.0
eps is saved in Photoshop CS4
Re: convert eps with clipping path to transparant png
Posted: 2010-07-30T15:16:46-07:00
by Drarakel
First check if the clipping path is still in your file (for example in the messages of "identify -verbose output.png").
Then you have to use the right command to use the clipping path (it might depend on which svg renderer is used). Sometimes "-clip" might be enough, but you could also try something like that:
convert input.eps -profile sRGB.icm -alpha transparent -clip -alpha opaque output.png
vital wrote:When i add -colorspace RGB
convert -colorspace RGB input.eps output.png
the result is a transparant PNG file in RGB but the colours are really bad
When you use "-colorspace RGB" before the input file, IM might use the Ghostscript device "pngalpha". So, here, Ghostscript delivers the transparency. But this device is only fine for RGB files, not for CMYK input files.
Re: convert eps with clipping path to transparant png
Posted: 2010-08-02T00:18:08-07:00
by vital
Thanks for the reply, Drarakel.
Drarakel wrote:First check if the clipping path is still in your file (for example in the messages of "identify -verbose output.png").
Checked this again and there is a clipping path in the file available
I noticed now that every time i use the -clip command, the convert.exe application
"encountered a problem and needed to close".
Anyone an idea what can cause this? Or where i can get more info about the cause of this.
I tried to read the information that the Windows server wants to send to Microsoft, but that is as clear to me as the shopping list of my chinese neighbour...
The Ghostscript part of your post explains a lot for me... I could not see the logic behind some of my testing results
Drarakel wrote:When you use "-colorspace RGB" before the input file, IM might use the Ghostscript device "pngalpha". So, here, Ghostscript delivers the transparency. But this device is only fine for RGB files, not for CMYK input files.
Re: convert eps with clipping path to transparant png
Posted: 2010-08-02T04:57:13-07:00
by Drarakel
Can you post a link to your file?
I don't get any crashs when using "-clip" (IM v6.6.3-2 Q16, Windows XP, internal SVG renderer) - but maybe your file is different.
Re: convert eps with clipping path to transparant png
Posted: 2010-08-02T05:57:40-07:00
by vital
Re: convert eps with clipping path to transparant png
Posted: 2010-08-02T06:25:47-07:00
by vital
We're running ImageMagick 6.6.0 on a Windows server 2003 (standard edition)
Re: convert eps with clipping path to transparant png
Posted: 2010-08-02T10:13:04-07:00
by Drarakel
I'm getting a fine, transparent picture with:
Code: Select all
convert -density 300 70407_CrackingB.eps -profile sRGB.icm -alpha transparent -clip -alpha opaque test.png
What was the commandline that gave you a crash?
Maybe you have to update ImageMagick and/or Ghostscript.
You could also post the output of "convert -list configure" and "convert -list format" (here, only the lines with "SVG" are of interest).
Re: convert eps with clipping path to transparant png
Posted: 2010-08-02T23:52:18-07:00
by vital
The same command does not produce any output on our server.
Whenever I use the -clip command, ImageMagick crashes.
list configure:
CC vs8
COPYRIGHT Copyright (C) 1999-2010 ImageMagick Studio LLC
DELEGATES bzlib freetype jpeg jp2 lcms png tiff x11 xml wmf zlib
HOST windows-unknown-linux-gnu
LIB_VERSION 0x660
LIB_VERSION_NUMBER 6,6,0,10
NAME ImageMagick
RELEASE_DATE 2010-04-01
VERSION 6.6.0
WEBSITE
http://www.imagemagick.org
Ghostscript is version 8.71
list format:
...
SVG SVG rw+ Scalable Vector Graphics (XML 2.4.19)
SVGZ SVG rw+ Compressed Scalable Vector Graphics (XML 2.4.19)
...
Re: convert eps with clipping path to transparant png
Posted: 2010-08-03T06:01:29-07:00
by Drarakel
The messages look alright.
I tried it now with IM v6.6.0-10 - and yeah, in that version the internal SVG renderer has problems with your clipping path.
Conclusion: Update your ImageMagick to v6.6.3-2. The crash should be gone after that.
Re: convert eps with clipping path to transparant png
Posted: 2010-08-03T06:44:23-07:00
by vital
Thanks a lot for the great help, Drarakel!
I'm downloading the update right now...
Re: convert eps with clipping path to transparant png
Posted: 2010-08-04T01:29:58-07:00
by vital
Installed the update and it works fine now.
Thanks again Drarakel.