SRT Rotate creates artifacts if PNG image touches an edge

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
KingoftheBears
Posts: 3
Joined: 2012-07-22T05:41:58-07:00
Authentication code: 15

SRT Rotate creates artifacts if PNG image touches an edge

Post 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
Last edited by KingoftheBears on 2012-07-26T12:32:45-07:00, edited 1 time in total.
KingoftheBears
Posts: 3
Joined: 2012-07-22T05:41:58-07:00
Authentication code: 15

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

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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.
KingoftheBears
Posts: 3
Joined: 2012-07-22T05:41:58-07:00
Authentication code: 15

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

Post 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!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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.
Post Reply