Page 1 of 1

upload and resize images

Posted: Fri Dec 03, 2004 10:31 am
by gurjit
hi all,

i was wondering if there is anyway i could upload any sized image and php can detect whether its suppose to resize it into portrait or landscape. Also i wanted to only supply for example 120px width for landscape and 100px height for potrait and php to scale the missing height or width depending on which one its is (potrait or landscape).

is this possible?

Posted: Fri Dec 03, 2004 10:46 am
by timvw
Yes, this is possible.

Posted: Fri Dec 03, 2004 10:47 am
by gurjit
any good links i can use to get info on how to do this?

Posted: Fri Dec 03, 2004 11:32 am
by John Cartwright
There is a nice Uploading class in the code snipplet section

viewtopic.php?t=17214

Posted: Fri Dec 03, 2004 11:38 am
by gurjit
nice piece of script but it looks like it dont let you choose the width size and auto size the height depending on potrait and landscape upload i need to be able to either set the width or height and the one left blank auto sizes....unless i'm wrong.

Posted: Fri Dec 03, 2004 11:43 am
by kettle_drum
No it doesnt, but you can simply work it out yourself. The method accepts the width and height of the thumbnail you want to create, so just change it to work out the ratio of the current image, and then resize accordingly.

Posted: Fri Dec 03, 2004 12:17 pm
by Joe
Start from: here