Author Topic: How can I use PHP to get the width and height of an image?  (Read 1323 times)

0 Members and 1 Guest are viewing this topic.

Offline jrgp

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 5037
How can I use PHP to get the width and height of an image?
« on: November 15, 2006, 10:24:20 pm »
How can I use PHP to get the width and height of an image?
(I'm building an awesome soldat site with a forum like, but not entirely forumish feel. I need to get the width and height of avatars and resize if necessary)
The image types will be jpeg, gif and png.
There are other worlds than these

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6144
    • Ultimate 13 Soldat

Offline jrgp

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 5037
Re: How can I use PHP to get the width and height of an image?
« Reply #2 on: November 16, 2006, 12:23:13 am »
Thanks
There are other worlds than these

Offline bja888

  • Flagrunner
  • ****
  • Posts: 745
  • Working
    • Bja888.com
Re: How can I use PHP to get the width and height of an image?
« Reply #3 on: November 16, 2006, 07:28:07 am »
U gotta download a new library? Its not included?

Offline Sethamundo

  • Inactive Staff
  • Flagrunner
  • *****
  • Posts: 607
Re: How can I use PHP to get the width and height of an image?
« Reply #4 on: November 16, 2006, 08:43:57 am »
Read The F*** Manual: http://us3.php.net/gd

http://us3.php.net/manual/en/function.getimagesize.php

Is this frustration I sense? :P

Reading the manual is the awnser to most problems with anything.  It's better to read the manual before posting a simple question.
Illumination is not reached by visualizing the light but by exploring the darkness.

Offline FliesLikeABrick

  • Administrator
  • Flamebow Warrior
  • *****
  • Posts: 6144
    • Ultimate 13 Soldat
Re: How can I use PHP to get the width and height of an image?
« Reply #5 on: November 16, 2006, 09:39:28 am »
U gotta download a new library? Its not included?

no, 99% of the time this functionality is compiled into php