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 »

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: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Images with transparent background problem

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

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 »

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: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Images with transparent background problem

Post 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.
snibgo's IM pages: im.snibgo.com
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Images with transparent background problem

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

Re: Images with transparent background problem

Post by kozis »

Thank you
T.
Post Reply