[solved] convert label with semi-transparent border has wrong background alpha value
Posted: 2016-07-08T16:18:14-07:00
Hello,
Running the following command should create an image with evenly red semi-transparent background color, right?
However, according to GIMP, the inner red has an alpha value of 227 (#e3) and the outer 170 (#aa)
Is this a bug or expected behavior?
I can work around this problem by using a different background alpha value. Don't know why though.
Arch Linux
SOLUTION
Running the following command should create an image with evenly red semi-transparent background color, right?
Code: Select all
convert -background '#ff0000aa' -fill white -pointsize 72 -bordercolor '#ff0000aa' -border 40x20 label:"TEST" test.png
Is this a bug or expected behavior?
I can work around this problem by using a different background alpha value. Don't know why though.
Code: Select all
convert -background '#ff00006c' -fill white -pointsize 72 -bordercolor '#ff0000aa' -border 40x20 label:"TEST" test2.png
Code: Select all
Version: ImageMagick 6.9.4-6 Q16 x86_64 2016-06-01 http://www.imagemagick.org
Features: Cipher DPC HDRI Modules OpenCL OpenMP
Delegates (built-in): bzlib cairo fontconfig freetype gslib jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png ps rsvg tiff webp wmf x xml zlib
SOLUTION
Thanks!fmw42 wrote:But using -compose atop seems to fix the issue and produces the desired result:
Code: Select all
convert -background "#ff0000aa" -fill "#ffffffff" -pointsize 72 -alpha set -channel rgba label:"TEST" -compose atop -bordercolor "#ff0000aa" -border 40x20 test.png