Hello,
I'm having problems with the following command:
convert /var/www/html/ocmwbm00/admin/pdf2swf/tmp/easystar.pdf -resize 400x400 -background white -gravity center -extent 400x400 /var/www/html/ocmwbm00/admin/pdf2swf/tmp/easystar%d.gif
I call this instruction through the exec command in php.
This is our version of imagemagick:
Version: ImageMagick 6.2.7 07/26/06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2006 ImageMagick Studio LLC
An example:
I have an image of 800*600. After resize this is 400*300 since I want to keep the aspect ratio. However the actual image has to be 400*400. Therefore I want a background colored white and I want to position the result image in the center of my new image. I have a multipage pdf that I want to convert to a multipage gif.
My result however is an image of 400*400 with a black background and a result image positioned in the top left corner.
Any ideas?
Kind regards,
Roel
ImageMagick 6.2.7 and background/gravity
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: ImageMagick 6.2.7 and background/gravity
I just looked on the examples page for extent and found this for you:
Before IM version v6.3.2, "-extent" just cleared the memory of any new areas to zero, or straight black. It did not fill the areas with "-background" color. Also after IM v6.3.2, "-extent" will use the "-gravity" to define where any new areas
So give my alternate method using -composite a try that I sent you by private message.
Fred
Before IM version v6.3.2, "-extent" just cleared the memory of any new areas to zero, or straight black. It did not fill the areas with "-background" color. Also after IM v6.3.2, "-extent" will use the "-gravity" to define where any new areas
So give my alternate method using -composite a try that I sent you by private message.
Fred