RE: [PHP] Image resize with background.
| From: | Martin Towell | Date: | Mon, 03 Nov 2003 02:09:27 +0000 |
| Subject: | RE: [PHP] Image resize with background. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-168368@lists.php.net to get a copy of this message | ||
try the resize copy function (can't remember the exact name ATM)
Set the destination's first colour to the desired background colour, then
copy/resize the image to it.
Martin
-----Original Message-----
From: Chris [mailto:csull@bellsouth.net]
Sent: Monday, 3 November 2003 12:36 PM
To: php-general@lists.php.net
Subject: [PHP] Image resize with background.
Hey guys. I have read a lot of different option to resize images.
What about a script that will resize an image, constrain proportions,
and add a background color to whatever is left.
For example, I have a picture that is 600 (width) by 300 (height) and I
want to constrain proportions, and resize this to 300 by 400 (width by
height). There would be an extra 250 pixels left in the height, so now
that gets filled in with some background color.
This way, the people that have to make any image fit in a certain
location can keep the same aspect ratio, and not have to have an 'out of
place' image.
Just a though. What do you guys think?
-Chris
Csull@bellsouth.net