Search code examples
imagemagicksprite-sheet

How to prevent a dark edge with transparency using montage?


I'm trying to montage some semi-transparent icons into one image using imagemagicks montage tool.

Unfortunately, after every operation with alpha a bit of black is showing everywhere on anti-aliased edges.

For example, these two icons:

icon 1
and
icon 2

After issuing

montage 1.png 2.png -background none montage.png

Result in:

montaged 1 and 2

I've tried numerous combinations of alpha, background and changing option order and haven't found a way to prevent this. Any idea?

My system is windows 8.1+cygwin, montage version is:

$ montage -version
Version: ImageMagick 6.9.1-3 Q16 x86_64 2015-07-01
http://www.imagemagick.org Copyright: Copyright (C) 1999-2015
ImageMagick Studio LLC License:
http://www.imagemagick.org/script/license.php Features: DPC OpenMP
Delegates (built-in): autotrace bzlib cairo fftw fontconfig freetype
fpx gslib jbig jng jpeg lcms lzma pangocairo png ps rsvg tiff webp x xml zlib


Solution

  • This looks like a version-specific bug, as the given command works fine on ImageMagick 6.9.1-10 and also using:

    convert 1.png 2.png +append 3.png