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.
rectangles are rendering as trapezoids
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: rectangles are rendering as trapezoids
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.
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.
Re: rectangles are rendering as trapezoids
Manual install of ImageMagic 6.9.3-8 fixed the problem. apt-get update would not update over 6.7.7.10.
-
- Posts: 45
- Joined: 2009-06-29T03:53:05-07:00
- Authentication code: 8675309
- Location: Germany/Munich
Re: rectangles are rendering as trapezoids
Hi,
looks to me like this issue came up again, I am using ImageMagick on Linux Mint 17.2:
strokewidth = 2 works fine and produces a proper rectangle
wheras a strokewidth = 3 results in a "trapezoid"
Best, Andreas
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
Code: Select all
convert -size 300x200 xc:gray -fill none -stroke blue -strokewidth 2 -draw "rectangle 50,50 250,150" rectStrokeWidth2.png
Code: Select all
convert -size 300x200 xc:gray -fill none -stroke blue -strokewidth 3 -draw "rectangle 50,50 250,150" rectStrokeWidth3.png
Re: rectangles are rendering as trapezoids
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.looks to me like this issue came up again
-
- Posts: 45
- Joined: 2009-06-29T03:53:05-07:00
- Authentication code: 8675309
- Location: Germany/Munich
Re: rectangles are rendering as trapezoids
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...
Andreas, still learning a lot...
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
Andreas, still learning a lot...
Re: rectangles are rendering as trapezoids
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
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
Re: rectangles are rendering as trapezoids
It fools everyone.
The timestamp is the time ImageMagick was compiled and built on your system.Is the timestamp related to the distros build date and not the ImageMagick release date?