Page 1 of 1

SRT Rotate creates artifacts if PNG image touches an edge

Posted: 2012-07-26T12:18:24-07:00
by KingoftheBears
Greetings!

The attached image is a basic ellipse shape made in Inkscape, exported as a png file.

When I apply this SRT distort to it:

convert IMbugInput.png +distort SRT "30" IMbugOutput.png

I get the bizarre extra lines upon rotation. A pixel level exam does show that the ellipse goes right to the edge of the image. My workaround (the image in production is literally a thousand times more complex) is just to pad 1px of transparency around the image, then crop it after the rotate.

I am extremely grateful for ImageMagick! I'm amazed at the animations that I'm able to create with it and wanted to share in some small way a means to an minor improvement ... unless, of course, this is a feature *;O)

This same issue happened on your latest release, 6.7.8 which I compiled from source, and from Opensuse 12.1 distro 6.7.2.

I'd be happy to assist if there is anything further I can do.

Thank you!
Image
Image

Re: SRT Rotate creates artifacts if PNG image touches an edg

Posted: 2012-07-26T12:20:07-07:00
by KingoftheBears
[Figured this out ...] I followed the Img tag prompts but I don't see my images. Let me know if there is something else I need to do for that, or perhaps they're just awaiting approval.

Re: SRT Rotate creates artifacts if PNG image touches an edg

Posted: 2012-07-26T14:56:35-07:00
by fmw42
try -virtual-pixel transparent. If I understand your issue, you may be getting edge effects due to the default setting of edge for -virtual-pixel.

Re: SRT Rotate creates artifacts if PNG image touches an edg

Posted: 2012-07-26T18:04:12-07:00
by KingoftheBears
fmw42 wrote:try -virtual-pixel transparent. If I understand your issue, you may be getting edge effects due to the default setting of edge for -virtual-pixel.
That was it exactly. Thank you very much!

Re: SRT Rotate creates artifacts if PNG image touches an edg

Posted: 2012-07-26T18:11:19-07:00
by fmw42
KingoftheBears wrote:
fmw42 wrote:try -virtual-pixel transparent. If I understand your issue, you may be getting edge effects due to the default setting of edge for -virtual-pixel.
That was it exactly. Thank you very much!
Glad it helped.