ImageMagick convert - text over alpha background
I am trying to post a copyright notice in a large batch of PNG images. I would like to place a message in the lower right corner in black text on a translucent white background. Here is my Windows command line script that traverses the images and starts the ImageMagick converter and composite pipeline:
for %%f in (*.png) do (
convert -background "#FFFFFF80" -font verdana -fill black ^
label:" (c) 2015 My Company " miff:- ^
| composite -compress zip -gravity SouthEast ^
-geometry +0+0 - "%%f" "credited\%%f.png" )
A white background with 50% opacity (0x80) works well, but when the label text is rendered into an image, there is a terrible gray background on the background of the characters. Here's an example by simply running the original convert to PNG.
Is this a bug or am I missing something important in managing the IM alpha channels?
source to share
Executing these commands on OSX with version 6.9.0-0 Q16 x86_64 2014-12-06
:
convert -background '#ffffff80' -font verdana \
-size 360 -fill black label:"Hello World" hw1.png
convert -background '#00000080' -font verdana \
-size 360 -fill black label:"Hello World" hw2.png
convert -background '#ff000080' -font verdana \
-size 360 -fill black label:"Hello World" hw3.png
composite hw1.png -geometry +100+10 hw2.png comp12.png
composite hw1.png -geometry +100+10 hw3.png comp13.png
creates the following images:
source to share