Problem with -blur on transparent with 7.0.8-47

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
User avatar
GeeMack
Posts: 709
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Problem with -blur on transparent with 7.0.8-47

Post by GeeMack » 2019-05-30T21:30:05-07:00

Using ImageMagick 7.0.8-47 Q16 x64 HDRI on Windows 10 and running this command...

Code: Select all

magick -background none -pointsize 36 ^
   -fill white label:"TESTING" -fill black label:"TESTING" -blur 0x2 -append blurtest.png
... generates this unexpected result...

Image

The issue only seems to occur when using both "-blur" and a transparent background.

Using ImageMagick 7.0.8-46 and running the same command creates the expected result...

Image

User avatar
fmw42
Posts: 25266
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Problem with -blur on transparent with 7.0.8-47

Post by fmw42 » 2019-05-30T23:03:42-07:00

In ImageMagick 7, the alpha channel is processed like the others. That was not true in IM 6. So add -channel rgb to your command before the -blur.

magick -background none -pointsize 36 ^
-fill white label:"TESTING" -fill black label:"TESTING" -channel rgb -blur 0x2 +channel -append blurtest.png

See if that works.

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

Re: Problem with -blur on transparent with 7.0.8-47

Post by snibgo » 2019-05-31T04:44:17-07:00

I don't know why 7.0.8-47 might be different to 7.0.8-46.

The alpha values in the -47 version are much higher than in -46. I suspect there is a new bug in "-blur" of alpha.

Fred's suggestion removes the blur of alpha, so I expect it shows no difference between -46 and -47.
snibgo's IM pages: im.snibgo.com

User avatar
magick
Site Admin
Posts: 11015
Joined: 2003-05-31T11:32:55-07:00

Re: Problem with -blur on transparent with 7.0.8-47

Post by magick » 2019-05-31T11:36:07-07:00

Convolution in IMv7 had a bug when dealing with alpha channels. The bug is fixed in -47. Using -channel RGB tells IM to ignore the alpha channel when blurring. It should, as Fred suggests, fix the problem you reported.

User avatar
GeeMack
Posts: 709
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: Problem with -blur on transparent with 7.0.8-47

Post by GeeMack » 2019-05-31T12:50:16-07:00

magick wrote:
2019-05-31T11:36:07-07:00
Convolution in IMv7 had a bug when dealing with alpha channels. The bug is fixed in -47.
The bug I'm describing just appeared in -47.
Using -channel RGB tells IM to ignore the alpha channel when blurring. It should, as Fred suggests, fix the problem you reported.
Using "-channel RGB" before the blur just eliminates any blurring effect at all.

User avatar
GeeMack
Posts: 709
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: Problem with -blur on transparent with 7.0.8-47

Post by GeeMack » 2019-05-31T12:59:45-07:00

This issue is described in a thread in THIS THREAD in the "Users" section of the forum.

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

Re: Problem with -blur on transparent with 7.0.8-47

Post by snibgo » 2019-05-31T13:34:01-07:00

I confirm GeeMack's command with v6.9.9-50 and v7.0.7-28 give the same result that GeeMack reports for 7.0.8-46. That result seems correct to me. I suspect a bug in 7.0.7-47.
snibgo's IM pages: im.snibgo.com

User avatar
magick
Site Admin
Posts: 11015
Joined: 2003-05-31T11:32:55-07:00

Re: Problem with -blur on transparent with 7.0.8-47

Post by magick » 2019-06-01T05:24:41-07:00

Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ https://www.imagemagick.org/download/beta/ by sometime tomorrow.

User avatar
GeeMack
Posts: 709
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: Problem with -blur on transparent with 7.0.8-47

Post by GeeMack » 2019-06-01T16:30:28-07:00

This issue appears to be resolved in v7.0.8-48. Thanks.

Post Reply