rectangles are rendering as trapezoids

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
cmeworld
Posts: 2
Joined: 2016-04-25T12:34:55-07:00
Authentication code: 1151

rectangles are rendering as trapezoids

Post by cmeworld »

I have upgraded our server to PHP 5.3.29 and ImageMagick to 6.7.7.10 on Ubuntu server 14.04. the following command did work on 6.6.9-7 with php version 5.2.17 on ubuntu 12.02.

"convert -size $size xc:'#000' -stroke 'rgba(162,240,238,0.75)' -strokewidth $borderStrokeWidth -draw 'rectangle $x1,$x1 $x2,$y2' {$this->source} -geometry $borderPosition -composite -stroke none $titleCmd $subCmd {$this->target}"

now this draws a trapezoid. The top left and bottom right corners draw with the correct position. the top right and bottom left way out of a alignment.
I have tried to move a version down on the imagemagick however it will not run with the PHP I am running. I have tried to upgrade the PHP to 5.5.9 and ImageMagick 6.7.7.10 with the same issue of rendering a trapezoid.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: rectangles are rendering as trapezoids

Post by fmw42 »

IM 6.7.7.10 is ancient (over 150 versions old). It is conceivable that there was a bug. Perhaps you should provide and example with actual numbers and not variables in it and post your results so others might be able to test. We have no idea what you have in your subcommands. So you need to be more specific with a complete test case that others can repeat.

Also can you test this in a terminal window without PHP to see if it is your PHP or Imagemagick at issue.

Also replace your single quotes about the -draw arguments with double quotes. I believe unix needs double quotes to resolve variables.
cmeworld
Posts: 2
Joined: 2016-04-25T12:34:55-07:00
Authentication code: 1151

Re: rectangles are rendering as trapezoids

Post by cmeworld »

Manual install of ImageMagic 6.9.3-8 fixed the problem. apt-get update would not update over 6.7.7.10.
aberkl
Posts: 45
Joined: 2009-06-29T03:53:05-07:00
Authentication code: 8675309
Location: Germany/Munich

Re: rectangles are rendering as trapezoids

Post by aberkl »

Hi,

looks to me like this issue came up again, I am using ImageMagick on Linux Mint 17.2:

Code: Select all

Version: ImageMagick 6.7.7-10 2017-05-26 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP
strokewidth = 2 works fine and produces a proper rectangle

Code: Select all

convert -size 300x200 xc:gray -fill none -stroke blue -strokewidth 2 -draw "rectangle 50,50 250,150" rectStrokeWidth2.png
wheras a strokewidth = 3 results in a "trapezoid"

Code: Select all

convert -size 300x200 xc:gray -fill none -stroke blue -strokewidth 3 -draw "rectangle 50,50 250,150" rectStrokeWidth3.png
Best, Andreas
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: rectangles are rendering as trapezoids

Post by Bonzo »

looks to me like this issue came up again
It has not come up again you are using the same version as the OP and it obviously has a bug. You need to use a later version.
aberkl
Posts: 45
Joined: 2009-06-29T03:53:05-07:00
Authentication code: 8675309
Location: Germany/Munich

Re: rectangles are rendering as trapezoids

Post by aberkl »

Hi Bonzo,

looking at the version string you are absolutely right. I should have noticed that. Just wondering where the (nearly) up-to-date timestamp comes from. Obviously it fooled me...
  • Version: ImageMagick 6.7.7-10 2017-05-26
Is the timestamp related to the distros build date and not the ImageMagick release date?

Andreas, still learning a lot...
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: rectangles are rendering as trapezoids

Post by Bonzo »

I found out this information earlier this year when I had a problem:

Linux distros start with a base Imagemaagick version and from memory one was 6.5 and then the next one was the 6.7.7 version.

Instead of updating the versions in the distro they "patch" it. BUT they often miss out bug fixes etc. This is why you have an old version with a new date - in this case the last patch was added on 2017-05-26.

All you can guarantee is that you have a valid 6.7.7 version but after that it all goes awry.

The best thing you can do is try and update it to a later version - your hosts should do it if you ask them nicely :)
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: rectangles are rendering as trapezoids

Post by glennrp »

aberkl wrote: 2017-07-19T06:39:44-07:00 looking at the version string you are absolutely right. I should have noticed that. Just wondering where the (nearly) up-to-date timestamp comes from. Obviously it fooled me...
It fools everyone.
Is the timestamp related to the distros build date and not the ImageMagick release date?
The timestamp is the time ImageMagick was compiled and built on your system.
Post Reply