Page 1 of 1

Possible bug sparse-color: IM 6.9.9.33 Q16 Mac OSX Sierra

Posted: 2018-01-13T12:11:48-07:00
by fmw42
In IM 6.9.9.33 sparse-color: misses a pixel at coords: 4,1. But it is fine in IM 7.0.7.21

Input (6x2 pixels black and white):
http://www.fmwconcepts.com/misc_tests/s ... /image.png

Enlarged for viewing:
Image

IM 7 is fine:

Code: Select all

magick image.png sparse-color:
0,0,gray(0) 1,0,gray(255) 2,0,gray(255) 3,0,gray(0) 4,0,gray(255) 5,0,gray(255) 0,1,gray(255) 1,1,gray(0) 2,1,gray(0) 3,1,gray(255) 4,1,gray(255) 5,1,gray(0)

or perhaps easier to see:

Code: Select all

magick image.png sparse-color:  | tr " " "\n"
0,0,gray(0)
1,0,gray(255)
2,0,gray(255)
3,0,gray(0)
4,0,gray(255)
5,0,gray(255)
0,1,gray(255)
1,1,gray(0)
2,1,gray(0)
3,1,gray(255)
4,1,gray(255)
5,1,gray(0)



But in IM 6, that pixel is missing:

Code: Select all

convert image.png sparse-color:
0,0,gray(0) 1,0,gray(255) 2,0,gray(255) 3,0,gray(0) 4,0,gray(255) 5,0,gray(255) 0,1,gray(255) 1,1,gray(0) 2,1,gray(0) 3,1,gray(255) 5,1,gray(0)

or

Code: Select all

convert image.png sparse-color:  | tr " " "\n"
0,0,gray(0)
1,0,gray(255)
2,0,gray(255)
3,0,gray(0)
4,0,gray(255)
5,0,gray(255)
0,1,gray(255)
1,1,gray(0)
2,1,gray(0)
3,1,gray(255)
5,1,gray(0)

Re: Possible bug sparse-color: IM 6.9.9.33 Q16 Mac OSX Sierra

Posted: 2018-01-13T12:27:22-07:00
by fmw42
P.S. It might be better to have sparse-color print a list rather than a string.

Re: Possible bug sparse-color: IM 6.9.9.33 Q16 Mac OSX Sierra

Posted: 2018-01-13T13:37:58-07:00
by magick
We get identical results for 6.9.9-34 and 7.0.7-22 under Fedora 27. The output of sparse: is designed for machine consumption so newlines are not recommended.

Re: Possible bug sparse-color: IM 6.9.9.33 Q16 Mac OSX Sierra

Posted: 2018-01-13T13:52:26-07:00
by fmw42
Perhaps a Mac issue only? Can you check on your Mac?

P.S. I just tested with the latest betas (6.9.9.34) and (7.0.7.22) and I still get coordinates 4,1,gray(0) missing for IM 6 but not for IM 7.

Re: Possible bug sparse-color: IM 6.9.9.33 Q16 Mac OSX Sierra

Posted: 2018-01-13T18:40:07-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 @ https://www.imagemagick.org/download/beta/ by sometime tomorrow.