Images with transparent background problem

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
kozis
Posts: 4
Joined: 2015-05-22T02:26:39-07:00
Authentication code: 6789

Images with transparent background problem

Post by kozis » 2015-05-22T02:53:46-07:00

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

snibgo
Posts: 9404
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Images with transparent background problem

Post by snibgo » 2015-05-24T12:46:29-07:00

On IM v6.9.1-0, I don't get the dark outline.

What version are you on? Perhaps you need to upgrade.
snibgo's IM pages: im.snibgo.com

kozis
Posts: 4
Joined: 2015-05-22T02:26:39-07:00
Authentication code: 6789

Re: Images with transparent background problem

Post by kozis » 2015-05-25T00:56:49-07:00

I used this version:
ImageMagick-6.9.1-2-Q16-x64-dll

kozis
Posts: 4
Joined: 2015-05-22T02:26:39-07:00
Authentication code: 6789

Re: Images with transparent background problem

Post by kozis » 2015-05-25T06:30:58-07:00

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.

snibgo
Posts: 9404
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Images with transparent background problem

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

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.
snibgo's IM pages: im.snibgo.com

User avatar
magick
Site Admin
Posts: 10692
Joined: 2003-05-31T11:32:55-07:00

Re: Images with transparent background problem

Post by magick » 2015-05-25T09:52:51-07:00

We can reproduce the problem you posted and have a patch in ImageMagick 6.9.1-4 Beta, available by sometime tomorrow. Thanks.

kozis
Posts: 4
Joined: 2015-05-22T02:26:39-07:00
Authentication code: 6789

Re: Images with transparent background problem

Post by kozis » 2015-05-25T10:02:36-07:00

Thank you
T.

Post Reply