Jump to content


Images in PHP


1 reply to this topic

#1 Mr. Matt

    Moderator

  • P2L Staff
  • PipPipPipPip
  • 1,945 posts
  • Gender:Not Telling

Posted 02 March 2006 - 04:43 AM

I have taken a look around the forum and tutorials but i am still a little confused.

What i am trying to do is resize and image if it is bigger then 800px in width and to make the image 800 x a height that fits the constant proportions of the image.

I am not sure if i have missed a tutorial or not searched the forum fully but any help i can get in doing this script would be really good!

btw i dont want someone to do it for me i just want help so i can do it myself.

Thanks!

#2 Av-

    I Feel Left Out

  • Members
  • PipPipPipPip
  • 1,971 posts
  • Gender:Male
  • Location:10 ft. below sea level

Posted 02 March 2006 - 12:44 PM

Read this and this. :)

Then you would do something along the lines of
<?php
 *code to check image dimensions
if($heigt > 800){
 *code to resize image
}
?>

If you want to keep the same width and height ratio, that would be a bit trickier





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users