How to do forced scaling with change of aspect ratio?

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
ptai

How to do forced scaling with change of aspect ratio?

Post by ptai »

-- Just changing the subject to make the question clearer.

How do you do the equivalent of "convert .... -resize '400x300!' ..." or "convert .... -resize '120x80%' ..." in PHP Imagic?

The resizeImage and scaleImage functions seem to always preserve aspect ratio.

Thanks.
mkoppanen
Posts: 309
Joined: 2007-06-09T07:06:32-07:00

Re: How to do forced scaling with change of aspect ratio?

Post by mkoppanen »

If you provide width and height the aspect ratio is not maintained.
Mikko Koppanen
My blog: http://valokuva.org
Post Reply