Fixed image resizing

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mattymatoo
Forum Newbie
Posts: 2
Joined: Sun Jun 06, 2010 10:01 am

Fixed image resizing

Post by mattymatoo »

Hi everyone,

Is it possible to resize all images to a fix square format using PHP?

At the moment if I resize a landscape picture the aspect ratios are maintained so the thumbnail is obviously in the same format. Is it possible to make the thumbnail square, to a fixed size, with a white background top and bottom so the picture keeps its original shape?

Thanks for your help !

Matt
User avatar
markusn00b
Forum Contributor
Posts: 298
Joined: Sat Oct 20, 2007 2:16 pm
Location: York, England

Re: Fixed image resizing

Post by markusn00b »

Huh? You say you want to resize it, without constraining the proportions, but you then say 'keeps its original shape'? I don't understand.
mattymatoo
Forum Newbie
Posts: 2
Joined: Sun Jun 06, 2010 10:01 am

Re: Fixed image resizing

Post by mattymatoo »

Thanks for the reply markusn00b. I didn't explain myself very well I know :)

I have finally found online exactly what i'm trying to achieve which works perfectly...

http://www.webxpert.ro/andrei/2009/01/0 ... -tutorial/

Thanks

Matt
User avatar
markusn00b
Forum Contributor
Posts: 298
Joined: Sat Oct 20, 2007 2:16 pm
Location: York, England

Re: Fixed image resizing

Post by markusn00b »

Glad you got it sorted :)
Post Reply