Dashed border around composite image (transparent background)

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
vital_n
Posts: 4
Joined: 2015-06-25T05:53:29-07:00
Authentication code: 6789

Dashed border around composite image (transparent background)

Post by vital_n »

Recently noticed a strange bug
When we place an image on a transparent background
a dashed border appears around it
Image

Here's the code we are using

Code: Select all

<?php
$canvas = new Imagick();
$canvas->newImage(500, 500, new ImagickPixel('transparent'), 'png');
$im = new Imagick('im_src.png');
$canvas->compositeImage($im, Imagick :: COMPOSITE_DEFAULT, 20, 20);
$canvas->writeImage('im_dst.png');

ImageMagick 6.9.1-2 Q16 amd64
IMagick extension 3.1.2

Is it a bug or some behavior changed recently?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Dashed border around composite image (transparent background)

Post by snibgo »

Your image shows rotation that is not in your code. Your image is jpg but your code writes a png. Your image is 488x407, not 500x500.
snibgo's IM pages: im.snibgo.com
vital_n
Posts: 4
Joined: 2015-06-25T05:53:29-07:00
Authentication code: 6789

Re: Dashed border around composite image (transparent background)

Post by vital_n »

That's a screenshot, this forum does not allow to attach files
Th rotation is in the source file, it does'nt matter since the same issue we have with other images
Last edited by vital_n on 2015-06-25T06:32:19-07:00, edited 1 time in total.
vital_n
Posts: 4
Joined: 2015-06-25T05:53:29-07:00
Authentication code: 6789

Re: Dashed border around composite image (transparent background)

Post by vital_n »

Here's the source png
http://printdirect.ru/tst/im_src.png
And here's te result of the code (there's no rotation at all )
http://printdirect.ru/tst/im_dst.png
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Dashed border around composite image (transparent background)

Post by fmw42 »

try upgrading to the latest version 6.9.1.6. I think this bug has been fixed in more current versions (6.9.1.4 or higher I think).
vital_n
Posts: 4
Joined: 2015-06-25T05:53:29-07:00
Authentication code: 6789

Re: Dashed border around composite image (transparent background)

Post by vital_n »

Yes upgrade helped. Thank you )
Post Reply