Jump to content


Php - Image property


1 reply to this topic

#1 CallmeJerre

    Young Padawan

  • Members
  • Pip
  • 1 posts

Posted 24 December 2004 - 01:55 PM

I've build a system (with php) that you can load up an image with some comments.
You post an image and it's displayed by a little version of it and when you click on it, it opens a new window where i show the image in real size.
My problem is, how can i know that the image has more width than height or more height than width...
I must know that because otherwise when the image has more height than width it is strechted out..(i put width=250 and height=200 for example)

Tnx for help

Happy Xmas, Jerre

#2 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 25 December 2004 - 04:33 PM

theres a way to see the width and height of an image using the GD library, i read it once at php.net, but the image did have to be uploaded, you can upload then check the size...

search php.net for the GD library functions (type something like "image" in their search feature at the top), and you should get a whole list of things

gl





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users