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

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

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

Post by fmw42 » 2018-01-13T12:11:48-07:00

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)

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

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

Post by fmw42 » 2018-01-13T12:27:22-07:00

P.S. It might be better to have sparse-color print a list rather than a string.

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

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

Post by magick » 2018-01-13T13:37:58-07:00

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.

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

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

Post by fmw42 » 2018-01-13T13:52:26-07:00

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.

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

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

Post by magick » 2018-01-13T18:40:07-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.

Post Reply