Weird clip path behaviour

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
SimonMacMullen

Weird clip path behaviour

Post by SimonMacMullen »

I'm trying to update an application using ImageMagick 5.5.7 to something a bit more up to date. This application needs to convert images in EPS with a clipping path to PNG (with transparency), using the clipping path to define the transparent region. It uses a command line like:

Code: Select all

$ convert -clip -draw "matte 0,0 floodfill" test.eps test.png
This works using 5.5.7 on Windows (and on 5.4.4 in a Debian Woody VM).

Using 6.3.4 (self-compiled on Debian, and on Windows) I get:

Code: Select all

$ convert -clip -draw "matte 0,0 floodfill" test.eps test.png
convert: Segment stack overflow `test.eps'.
...and the image is created, but is black where it should be transparent.

Using 6.2.4 from Debian testing I sometimes get the above error, and sometimes none (but in that case the image is not clipped). It seems to depend on the image.

I'm afraid I can't post the images I'm using publicly, but can email them.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Weird clip path behaviour

Post by magick »

We need to extend the draw matte method to deal with CMYK images. We will have a fix for that in a few days. In the mean-time draw in the RGB colorspace with this command:
  • convert -colorspace RGB test.eps -clip -draw "matte 0,0 floodfill" test.png
SimonMacMullen

Re: Weird clip path behaviour

Post by SimonMacMullen »

Thanks!

Err, the -colorspace option doesn't seem to change things for me with 6.3.4 - I'm still seeing the same stack overflow?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Weird clip path behaviour

Post by magick »

We have a patch in ImageMagick 6.3.4-5 beta if you want to give that a try. See ftp://ftp.imagemagick.org/pub/ImageMagick/beta.
Post Reply