Page 1 of 1

IM 7.0.2-1 odd behavior with "-draw"

Posted: 2016-06-26T16:20:44-07:00
by GeeMack
Using "ImageMagick 7.0.2-1 Q16 x64 2016-06-23" (HDRI, static) on Windows 7 64. I've recently encounterd problems with some "-draw" operations that result some pretty odd behavior. This command...

Code: Select all

magick ^
   -size 1200x1000 ^
   xc:lightgreen ^
   -stroke darkred ^
   -strokewidth 10 ^
   -fill lightpink ^
   -draw "rectangle 50,50 1150,950" ^
     1200x1000.png
... produces an image with a rectangle drawn on it. The pink rectangle itself seems proper, but the red stroke does not follow the outline of the rectangle, and the width of the stroke changes from one end to the other on the top edge. This is the image I get from that command...

Image

Changing the basic image shape to a square, and drawing a rectangle with this command...

Code: Select all

magick ^
   -size 1200x1200 ^
   xc:lightgreen ^
   -stroke darkred ^
   -strokewidth 10 ^
   -fill lightpink ^
   -draw "rectangle 50,50 1150,1150" ^
     1200x1200.png
... results in a similar problem to the one found in the first image above. Again the pink rectangle itself is in the right place, but the red stroke changes width and doesn't follow the perimeter of the rectangle. Here is the image...

Image

I provided the large examples above to make the issues visually obvious, but these problems also occur in much smaller examples.

I don't know if it's related, but I also have an issue with a '-draw "line ..."' operation in a lengthy command that completely locks up my computer. It freezes the whole system and requires a hard reset. I can reproduce it in the same command, and eliminate the problem by taking the "-draw" operation out of the command. I haven't come up with a simplified example yet to submit here for testing, but man, do I ever hate crashing my computer over and over to test stuff. ;)

Re: IM 7.0.2-1 odd behavior with "-draw"

Posted: 2016-06-26T16:29:22-07:00
by fmw42
I get the same bad results on 7.0.2-1 Q16 (non-hdri) and also on 6.9.4-10 Q16 (non-hdri) on my Mac for the commands given above.

Possibly introduced with:

2016-06-09 6.9.4-9 Cristy <quetzlzacatenango@image...>
Fix drawing glitch for stroke widths greater than 2 (reference https://github.com/ImageMagick/ImageMagick/issues/218).

or some potential change for the line cap issue that has been reported.

Re: IM 7.0.2-1 odd behavior with "-draw"

Posted: 2016-06-26T17:36:37-07:00
by magick
This is a transient bug fixed in ImageMagick 7.0.2-2. Look for a release within a day or two.