Page 1 of 1

Dashed border around composite image (transparent background)

Posted: 2015-06-25T05:59:20-07:00
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?

Re: Dashed border around composite image (transparent background)

Posted: 2015-06-25T06:16:30-07:00
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.

Re: Dashed border around composite image (transparent background)

Posted: 2015-06-25T06:23:05-07:00
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

Re: Dashed border around composite image (transparent background)

Posted: 2015-06-25T06:31:25-07:00
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

Re: Dashed border around composite image (transparent background)

Posted: 2015-06-25T08:57:10-07:00
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).

Re: Dashed border around composite image (transparent background)

Posted: 2015-06-25T22:40:51-07:00
by vital_n
Yes upgrade helped. Thank you )