Page 1 of 1

Possible bug IM 7.0.8.54 -alpha shape

Posted: 2019-07-18T18:39:29-07:00
by fmw42

Re: Possible bug IM 7.0.8.54 -alpha shape

Posted: 2019-07-20T06:22:34-07:00
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.

Re: Possible bug IM 7.0.8.54 -alpha shape

Posted: 2019-07-22T18:25:53-07:00
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

Re: Possible bug IM 7.0.8.54 -alpha shape

Posted: 2019-07-23T04:08:37-07:00
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.

Re: Possible bug IM 7.0.8.54 -alpha shape

Posted: 2019-07-23T09:38:17-07:00
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

Re: Possible bug IM 7.0.8.54 -alpha shape

Posted: 2019-07-24T03:19:40-07:00
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.