IM 7.0.2-1 odd behavior with "-draw"

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
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

IM 7.0.2-1 odd behavior with "-draw"

Post 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. ;)
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post by magick »

This is a transient bug fixed in ImageMagick 7.0.2-2. Look for a release within a day or two.
Post Reply