possible bug -draw polyline IM 6.4.2-8
Posted: 2008-08-16T12:24:47-07:00
IM 6.4.2-8 Q16 Mac OSX Tiger
I think I have found a bug in -draw with polyline (or any option that uses a set of points). It would appear that -draw gives a non-conforming drawing primitive error when a point is a fraction less than 1, because it does not have a leading 0, e.g. .5 vs 0.5
For example note the second point in the list:
points="0,0 .6,2.1 1.2,4.6 1.9,7.6 2.6,11.0 3.3,14.6 4.0,18.5 4.9,22.6 5.8,27.0 6.7,31.4 7.8,35.9 8.9,40.4 10.2,45.0 11.5,49.4 13.0,53.8 14.6,58.0 16.4,62.0 18.3,65.7 20.3,69.1 22.5,72.2 25.0,75.0 27.7,77.4 30.8,79.6 34.2,81.6 38.0,83.6 41.9,85.3 46.1,86.9 50.5,88.4 55.0,89.8 59.5,91.0 64.0,92.1 68.5,93.2 73.0,94.2 77.3,95.0 81.4,95.9 85.3,96.6 89.0,97.4 92.3,98.0 95.3,98.7 97.8,99.3 100,100"
convert -size 101x101 xc:white -fill white \
-draw "stroke red polyline $points" \
-flip test_interp_graph.gif
convert: Non-conforming drawing primitive definition `polyline'.
But if I repeat exactly the same but adding the leading 0:
points="0,0 0.6,2.1 1.2,4.6 1.9,7.6 2.6,11.0 3.3,14.6 4.0,18.5 4.9,22.6 5.8,27.0 6.7,31.4 7.8,35.9 8.9,40.4 10.2,45.0 11.5,49.4 13.0,53.8 14.6,58.0 16.4,62.0 18.3,65.7 20.3,69.1 22.5,72.2 25.0,75.0 27.7,77.4 30.8,79.6 34.2,81.6 38.0,83.6 41.9,85.3 46.1,86.9 50.5,88.4 55.0,89.8 59.5,91.0 64.0,92.1 68.5,93.2 73.0,94.2 77.3,95.0 81.4,95.9 85.3,96.6 89.0,97.4 92.3,98.0 95.3,98.7 97.8,99.3 100,100"
convert -size 101x101 xc:white -fill white \
-draw "stroke red polyline $points" \
-flip test_interp_graph.gif
It returns successfully.
P.S.
It does not fail if the the second member of the comma delimited pair has no leading zero, e.g. this works: 1.5,.5
Thus it appears that it does not like a leading period in any list item.
I think I have found a bug in -draw with polyline (or any option that uses a set of points). It would appear that -draw gives a non-conforming drawing primitive error when a point is a fraction less than 1, because it does not have a leading 0, e.g. .5 vs 0.5
For example note the second point in the list:
points="0,0 .6,2.1 1.2,4.6 1.9,7.6 2.6,11.0 3.3,14.6 4.0,18.5 4.9,22.6 5.8,27.0 6.7,31.4 7.8,35.9 8.9,40.4 10.2,45.0 11.5,49.4 13.0,53.8 14.6,58.0 16.4,62.0 18.3,65.7 20.3,69.1 22.5,72.2 25.0,75.0 27.7,77.4 30.8,79.6 34.2,81.6 38.0,83.6 41.9,85.3 46.1,86.9 50.5,88.4 55.0,89.8 59.5,91.0 64.0,92.1 68.5,93.2 73.0,94.2 77.3,95.0 81.4,95.9 85.3,96.6 89.0,97.4 92.3,98.0 95.3,98.7 97.8,99.3 100,100"
convert -size 101x101 xc:white -fill white \
-draw "stroke red polyline $points" \
-flip test_interp_graph.gif
convert: Non-conforming drawing primitive definition `polyline'.
But if I repeat exactly the same but adding the leading 0:
points="0,0 0.6,2.1 1.2,4.6 1.9,7.6 2.6,11.0 3.3,14.6 4.0,18.5 4.9,22.6 5.8,27.0 6.7,31.4 7.8,35.9 8.9,40.4 10.2,45.0 11.5,49.4 13.0,53.8 14.6,58.0 16.4,62.0 18.3,65.7 20.3,69.1 22.5,72.2 25.0,75.0 27.7,77.4 30.8,79.6 34.2,81.6 38.0,83.6 41.9,85.3 46.1,86.9 50.5,88.4 55.0,89.8 59.5,91.0 64.0,92.1 68.5,93.2 73.0,94.2 77.3,95.0 81.4,95.9 85.3,96.6 89.0,97.4 92.3,98.0 95.3,98.7 97.8,99.3 100,100"
convert -size 101x101 xc:white -fill white \
-draw "stroke red polyline $points" \
-flip test_interp_graph.gif
It returns successfully.
P.S.
It does not fail if the the second member of the comma delimited pair has no leading zero, e.g. this works: 1.5,.5
Thus it appears that it does not like a leading period in any list item.