Possible bug IM 7.0.8.54 -alpha shape

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
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Possible bug IM 7.0.8.54 -alpha shape

Post by fmw42 »

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

Re: Possible bug IM 7.0.8.54 -alpha shape

Post by magick »

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 @ http://www.imagemagick.org/download/beta/ by sometime tomorrow.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Possible bug IM 7.0.8.54 -alpha shape

Post by fmw42 »

Testing between IM 6.9.10.56 and IM 7.0.8.56 Mac OSX Sierra (libpng 1.6.36) gives different results. IM 7 result has noise.

I note that the tmp files in the command are identical. So it is either -blur or -alpha shape.

Code: Select all

convert -background none -font Arial -pointsize 140 -strokewidth 14 \( -stroke black -fill none label:LEGEND +write tmp6a.png \) \( -fill black -stroke none label:LEGEND +write tmp6b.png \) -compose DstIn -composite +write tmp6c.png -alpha extract -blur 1 -background "red" -alpha shape shape6.png
Image

Code: Select all

magick -background none -font Arial -pointsize 140 -strokewidth 14 \( -stroke black -fill none label:LEGEND +write tmp7a.png \) \( -fill black -stroke none label:LEGEND +write tmp7b.png \) -compose DstIn -composite +write tmp7c.png -alpha extract -blur 1 -background "red" -alpha shape shape7.png
Image
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Possible bug IM 7.0.8.54 -alpha shape

Post by magick »

Your commands work for us, we get identical results for IMv6 & IMv7. Turn off OpenCL and try again. Did that work? If so it could be -blur giving incorrect results on your GPU.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Possible bug IM 7.0.8.54 -alpha shape

Post by fmw42 »

OpenCL was disabled. Can you check on your Mac?

Code: Select all

Version: ImageMagick 7.0.8-56 Q16 x86_64 2019-07-21 https://imagemagick.org
Copyright: © 1999-2019 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP(3.1) 
Delegates (built-in): bzlib cairo djvu fftw fontconfig freetype gslib gvc jbig jng jp2 jpeg lcms lqr ltdl lzma openexr png ps raw rsvg tiff webp x xml zlib
It is not -blur. I tried by removing it

Code: Select all

magick -background none -font Arial -pointsize 140 -strokewidth 14 \( -stroke black -fill none label:LEGEND +write tmp7a.png \) \( -fill black -stroke none label:LEGEND +write tmp7b.png \) -compose DstIn -composite +write tmp7c.png -alpha extract -background "red" -alpha shape shape7.png
And still get a noise result.


OK. I resolved it. It is OpenMP. I set -limit thread 1 and it works OK with the command below:

Code: Select all

magick -limit thread 1 -background none -font Arial -pointsize 140 -strokewidth 14 \( -stroke black -fill none label:LEGEND +write tmp7a.png \) \( -fill black -stroke none label:LEGEND +write tmp7b.png \) -compose DstIn -composite +write tmp7c.png -alpha extract -blur 1 -background "red" -alpha shape shape7.png
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Possible bug IM 7.0.8.54 -alpha shape

Post by magick »

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 @ http://www.imagemagick.org/download/beta/ by sometime tomorrow.
Post Reply