RE: [PHP] Image resize with background.

This is a discussion on RE: [PHP] Image resize with background. within the PHP General forums, part of the PHP Programming Forums category; try the resize copy function (can't remember the exact name ATM) Set the destination's first colour to the ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-03-2003
Martin Towell
 
Posts: n/a
Default RE: [PHP] Image resize with background.

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
Reply With Quote
  #2 (permalink)  
Old 11-03-2003
Geoff Berrow
 
Posts: n/a
Default Re: [PHP] Image resize with background.

I noticed that Message-ID:
<6416776FCC55D511BC4E0090274EFEF50820798E@exchange .world.net> from
Martin Towell contained the following:

>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.


or put it in a table and set the b/g colour of that.

--
Geoff Berrow
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:03 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0