Single line rectangles not working

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
jflanagan
Posts: 1
Joined: 2019-05-18T06:12:54-07:00
Authentication code: 1152

Single line rectangles not working

Post by jflanagan »

It appears that single line rectangles do not work any more. Is this intentional? What I mean by single line is that it has a single pixel width - the x coordinate is the same for the start and end.

For example, in version 6.9.6-2 Q16 this command used to generate a single 1 pixel wide line, 8 pixels long :

Code: Select all

convert -size 10x10 canvas:white -stroke black -strokewidth 1 -fill blue -draw "rectangle 1,1 1,8" oneline.bmp
In version 6.9.10-6 Q16, that same command generates an all white image with no lines.

If I change the endpoint for a single pixel wider, it generates a line that is 2 pixels wide and 8 pixels long, as expected:

Code: Select all

convert -size 10x10 canvas:white -stroke black -strokewidth 1 -fill blue -draw "rectangle 1,1 2,8" oneline.bmp
It appears that you can no longer generate a 1 pixel wide line using the rectangle command.

Can you confirm if this is intentional or a bug?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Single line rectangles not working

Post 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.
Post Reply