Width and height - how to get Images in a fixed canvas

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
normaldenker
Posts: 3
Joined: 2009-02-12T09:46:11-07:00

Width and height - how to get Images in a fixed canvas

Post by normaldenker »

Hello guys,

first: sorry for a possibly bad explanation, but it's not really
easy describing it in english.

I use the command like this
exec("/usr/bin/convert $userfile[0]: -resize ....)

My problem is: I'd like to have a fixed canvas, in which
i print my pictures. Vertical ones should have the same
height as horizontals.

E.g., Canvas Size: 300 x 300 px --> horizontal pictures
fill the whole canvas with 300x300 px.

Vertical pictures can not be fit on this canvas. For this
case, I'd like know how to use imagemagick to fit a
120 x 520 px pic on this canvas with a rest of the canvas'
background color.

Look here e.g. --> http://www.welt.de/vermischtes/article3 ... assen.html

thanks for helping me!
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: Width and height - how to get Images in a fixed canvas

Post by mkoppanen »

Mikko Koppanen
My blog: http://valokuva.org
normaldenker
Posts: 3
Joined: 2009-02-12T09:46:11-07:00

Re: Width and height - how to get Images in a fixed canvas

Post by normaldenker »

That's it. Thank you!
Post Reply