label: with partially transparent background

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
geitda
Posts: 7
Joined: 2015-06-26T12:27:40-07:00
Authentication code: 6789

label: with partially transparent background

Post by geitda » 2015-06-26T13:00:26-07:00

The label: pseudo-image doesn't seem to handle working with transparent backgrounds.

ImageMagick-6.9.1-Q16 64-bit on Windows 7

Code: Select all

convert -depth 8 -background #00CC0033 -pointsize 72 label:"This is a label" png32:label.png
results in
Image

I had to use -depth 8 as convert was giving a 64-bit RGBA (16-bit per channel) PNG without it. After adding the -depth 8, I found that the result must have been expressible as an PLTE+tRNS PNG, as that's what I initially got, so I added the png32: format specifier. If I understand correctly how png:32 works, then that's all I actually need and can skip the -depth 8, but I wanted to show exactly what I used to generate the above image.
As you can see, the transparency is wrong inside the letters. Work-arounds are welcome, but this probably needs fixed within the label: pseudo-image operation. Fully transparent works as expected (like #00CC0000), so I could probably compose that over a separately generated transparent background.

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

Re: label: with partially transparent background

Post by snibgo » 2015-06-26T13:36:56-07:00

With your command, versions 6.9.1-0 and the current 6.9.1-6, on Windows 8.1, I don't get the problem you report. The background is a consistent #0c03.

Exactly what version are you using? "convert -version"
snibgo's IM pages: im.snibgo.com

geitda
Posts: 7
Joined: 2015-06-26T12:27:40-07:00
Authentication code: 6789

Re: label: with partially transparent background

Post by geitda » 2015-06-29T05:47:08-07:00

Code: Select all

convert -version
Version: ImageMagick 6.9.1-2 Q16 x64 2015-04-14 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: DPC Modules OpenMP
Delegates (built-in): bzlib cairo freetype jbig jng jp2 jpeg lcms lqr openexr
pangocairo png ps rsvg tiff webp xml zlib

geitda
Posts: 7
Joined: 2015-06-26T12:27:40-07:00
Authentication code: 6789

Re: label: with partially transparent background

Post by geitda » 2015-06-29T06:04:14-07:00

Upgraded to 6.9.1-6 and the problem is indeed resolved. Not sure what was going on, and I didn't realize I was already nearly 3 months behind, but thanks.

Post Reply