Page 1 of 1

Images with transparent background problem

Posted: 2015-05-22T02:53:46-07:00
by kozis
Hello,

I'm trying to combine multiple images with transparent background into single one with transparent background too.

I combine empty image Canvas.png (just transparent background) as canvas with image Source.png (yellow circle on transparent background):
Image

With script like this:
composite -gravity center -background none Source.png Canvas.png Result.png

Here is result image with some "dark outline", which I need to remove:
Image

I tried so many combinations and -alpha settings, but without success.

Can You help me please?
Thank You, Tomas

Re: Images with transparent background problem

Posted: 2015-05-24T12:46:29-07:00
by snibgo
On IM v6.9.1-0, I don't get the dark outline.

What version are you on? Perhaps you need to upgrade.

Re: Images with transparent background problem

Posted: 2015-05-25T00:56:49-07:00
by kozis
I used this version:
ImageMagick-6.9.1-2-Q16-x64-dll

Re: Images with transparent background problem

Posted: 2015-05-25T06:30:58-07:00
by kozis
I'm not sure, if I'm doing something wrong, but if I try just draw a circle to transparent background, I have the same problem, as described above ("dark outline"). (Win 7, *.bat, ImageMagick-6.9.1-3-Q16-x64-dll.exe)

convert -size 100x100 xc:none -fill pink -draw "circle 50,50 40,10" Test.png
Image

Do You anybody have a working example of drawing at transparent background?
Thx. T.

Re: Images with transparent background problem

Posted: 2015-05-25T07:58:11-07:00
by snibgo

Code: Select all

convert -size 100x100 xc:none -fill pink -draw "circle 50,50 40,10" Test.png
For IM v6.9.1-0 in Windows 8.1, this works fine for me. At the antialiasing, I get the same pink as in the central opaque area. Your result has a darker pink, that becomes darker with increasing transparency, to fully transparent black. The graduation in opacity is correct, but the colour shouldn't change in the antialiased region.

This seems to be a bug, so I'm moving it to the bugs forum.

Re: Images with transparent background problem

Posted: 2015-05-25T09:52:51-07:00
by magick
We can reproduce the problem you posted and have a patch in ImageMagick 6.9.1-4 Beta, available by sometime tomorrow. Thanks.

Re: Images with transparent background problem

Posted: 2015-05-25T10:02:36-07:00
by kozis
Thank you
T.