Converting EPS with Clipping Path to Png - Changes between 6.7.7 and 6.8.9

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?".
Post Reply
alexm
Posts: 17
Joined: 2015-03-19T10:15:14-07:00
Authentication code: 6789

Converting EPS with Clipping Path to Png - Changes between 6.7.7 and 6.8.9

Post by alexm »

I am converting EPS files that have a SVG clipping path to transparent PNGs.
The clipped region should be transparent in the resulting PNG.

Code: Select all

convert -density 299.99899291992x299.99899291992 40d7711576cd65e921c8c671f132acaf9a13732d.eps"[0] -resize 1566x4174 -alpha set -channel alpha -clip -negate /tmp/ImageConvert288438BkErGB.png
convert -density 299.99899291992x299.99899291992 "/tmp/ImageConvert288438BkErGB.png"[0] -resize 1566x4174 -channel alpha -negate size1_40d7711576cd65e921c8c671f132acaf9a13732d.png
I am using the following code.
The strange density values come from a computation. I might add a rounding :)

In some version of Imagemagick this was working fine.
Now I discovered that in 6.7.7-10 it is not working as expected: I get a black background.
In 6.8.9 I am getting a new error:

"Output: convert: image size differs" during the first command. The size specified (1566x4174) just differes a few pixels from the TMP file which is created (1566x4171).
(Return Code 1)

But I saw, that when I leave the whole clipping options out:

Code: Select all

convert -density 299.99899291992x299.99899291992 "40d7711576cd65e921c8c671f132acaf9a13732d.eps"[0] -resize 1566x4174 size1_40d7711576cd65e921c8c671f132acaf9a13732d.png
I pretty much get the result I need.

So my questions are the following:
1) Why does it in the recent image magick work without the -clip option? Can leaving out the -clip option have other side effects?
2) Where does this image size differs error come from? Is it only a warning or a real error? The interesting part is, that the output file is still created. Should I just ignore this error?
Post Reply