Page 1 of 2
Converting eps to eps3 loosing clipping path
Posted: 2015-03-19T10:19:24-07:00
by alexm
I have an EPS file with a clipping path (as shown via identify -verbose).
When saving it to eps3 the clipping path is lost.
I use this command:
convert "cmyk_pfad_weiß.eps"[0] -clip -profile CMYK/USWebUncoated.icc -profile CMYK/USWebUncoated.icc eps3:cmyk_pfad_weiß.out.eps
When saving to normal EPS the clipping path is there, but the color profile becomes sRGB and all colors look inverted.
Version:
Version: ImageMagick 6.7.7-10 2014-03-06 Q16
http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
Re: Converting eps to eps3 loosing clipping path
Posted: 2015-03-19T13:39:16-07:00
by snibgo
Your version is very old. I suggest you try it with a more recent version. If that doesn't help, upload a test image to somewhere like dropbox.com and paste the URL here.
Re: Converting eps to eps3 loosing clipping path
Posted: 2015-03-20T09:06:50-07:00
by alexm
Hi,
I just tried it with IM 6.9.0-10 Q16 x64_64 - same problem.
Currently I can not provide the EPS, but with a JPEG (with Path) -> EPS3 I have the same problem.
Here is the file I am using:
http://www.file-upload.net/download-104 ... d.jpg.html
$ /opt/imagemagick-6.9/bin/identify -verbose dreieck_rgb_pfad.jpg | grep Clipping
Clipping path:
$ /opt/imagemagick-6.9/bin/convert dreieck_rgb_pfad.jpg -clip eps3:out.eps
$ /opt/imagemagick-6.9/bin/identify -verbose out.eps | grep Clipping
(no output)
Regards,
Alex
Re: Converting eps to eps3 loosing clipping path
Posted: 2015-03-20T12:51:54-07:00
by snibgo
Okay, converting to EPS: retains the clip path but converting to EPS3: doesn't. Sorry, I know nothing about EPS files. Someone else might comment.
Re: Converting eps to eps3 loosing clipping path
Posted: 2015-03-24T01:55:12-07:00
by alexm
Can this be fixed?
Re: Converting eps to eps3 loosing clipping path
Posted: 2015-03-24T02:36:09-07:00
by alexm
Is anybody available to fix his on hire-basis. What would be the cost? You could send me an email to a.menk at imi.de
Re: Converting eps to eps3 loosing clipping path
Posted: 2015-03-24T11:39:28-07:00
by pipitas
alexm wrote:
Currently I can not provide the EPS, but with a JPEG (with Path) -> EPS3 I have the same problem.
Here is the file I am using:
http://www.file-upload.net/download-104 ... d.jpg.html
$ /opt/imagemagick-6.9/bin/identify -verbose dreieck_rgb_pfad.jpg | grep Clipping
Clipping path:
I really don't understand what you are trying to achieve.
There is no such thing (as far as I am aware of) as a "clipping path" in a JPEG...
Can you explain in laymen's word what it is that you finally try to achieve when processing your EPS files in question?
Because ImageMagick isn't the best thing in the world to process EPS. ImageMagick excels when it comes to raster formats.
EPS can be three things:
- entirely composed of vector shapes (possibly including text made with fonts)
- entirely composed of raster images
- composed of a mix of rasters and vectors
In each and every case ImageMagick does not process the EPS input itself. It calls Ghostscript as its
delegate, and asks it to convert the EPS page into a complete raster image first. Only then does IM kick in and start to do what it can best: process the raster image it received from Ghostscript. When IM then creates an output EPS, that will always be a raster image, wrapped into an EPS syntax framework...
If your final goal is to again get an EPS output from the EPS input, you'll never get the vectors back. That means you have very likely lost contents and quality. You certainly will have lost any fonts that may have been contained in the original EPS.
There may be other ways to convert an EPS to EPS than going through the ImageMagick detour which enforces rasterization of whatever vectors where in the input...
Re: Converting eps to eps3 loosing clipping path
Posted: 2015-03-24T12:46:41-07:00
by dlemstra
I just tried to see if I could copy the part that writes the 8bim profile which contains the clippath to the eps3 writer and IM can read the profile. (the output file can be found here:
https://www.dropbox.com/s/3i3b7ju7l2fxp ... d.eps?dl=0) But I cannot find a document that tells me if this is allowed according to the official PostScript specifications. Can you or one of the other readers of this topic help me find a document that tells us it is allowed to write '%BeginPhotoshop' in a PostScript 3 document?
p.s. I got the feeling this is evil since this is my 666th post.
Re: Converting eps to eps3 loosing clipping path
Posted: 2015-03-25T02:09:46-07:00
by alexm
@pipitas
There IS a clipping path in JPG. At least photoshop can store it and it is displayed when I do a identify -verbose. Also EPS files can have such a clipping path.
Anyways, I am aware of the fact that other vectors are lost when converting with imagemagick. In our case the images are raster images embedded in EPS with a clipping path - so this should not be a problem.
@dlemstra:
Thanks for the test. I can see the clipping path in IM - but not in Photoshop.
I have no clue which format photoshop is expecting.
I have a file here created by photoshop with a clipping path:
https://cloud.imi.de/public.php?service ... fd04c2556a (dreieck_rgb_pfad2_photoshop.eps)
Image magick also reads this clipping path.
What I saw is that the file you uploaded causes photoshop to display a rastering dialog when opened, the files I have to convert and the dreieck_rgb_pfad2_photoshop.eps do not cause this raster dialog and a clipping path is available in Photoshop.
Regards,
Alex
Re: Converting eps to eps3 loosing clipping path
Posted: 2015-03-25T03:24:27-07:00
by dlemstra
This looks like a Level 1 Postscript file. I don't have Photoshop but is there an option to save the eps file in a Postscript 3 format?
Re: Converting eps to eps3 loosing clipping path
Posted: 2015-03-25T03:28:26-07:00
by alexm
But it shows "ps:Level: Adobe-3.0 EPSF-3.0" - doesn't that mean level 3 ?
Re: Converting eps to eps3 loosing clipping path
Posted: 2015-03-25T03:38:19-07:00
by dlemstra
I really don't know if the format is 'level' 3. But ImageMagick writes the image data differently from the file you supplied. The eps file that I supplied contains a 'DisplayImage' block and your file contains 'beginimage'. It looks like in our eps3 writer the image is written 'as is' instead of a block of 'pixels' (FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF). This is what makes 'my' file much smaller.
Re: Converting eps to eps3 loosing clipping path
Posted: 2015-03-25T04:01:23-07:00
by alexm
okay. did you find anything about the clipping path? Where it is different? How can I view the Postscript source of an EPS file? It looks compressed.
Re: Converting eps to eps3 loosing clipping path
Posted: 2015-03-25T04:20:24-07:00
by dlemstra
I am just viewing the eps files with a text editor. The file that you supplied seems to create the image in a different format then ImageMagick.
Re: Converting eps to eps3 loosing clipping path
Posted: 2015-03-25T04:26:44-07:00
by alexm
Did you find out how Photoshop is storing the clipping path different to ImageMagick? Can imagemagick store it the same way?