Jump to content

[SOLVED] getimagesize.. finding width and height.


Dragen

Recommended Posts

how can I use

getimagesize();

to find the height and width of an image?

I know it's a simple thing to do, but I don't quite understand the getimagesize and how to use it..

I've read the manual, but don't understand how to save the width and height as variables..

 

thanks

For reference:

 

I believe this is how it outputs as per notes on PHP.net. I cannot check as my host does not allow use of that function.

 

Array[0] = Width

Array[1] = Height

Array[2] = Image Type Flag

Array[3] = width="xxx" height="xxx"

Array[4] = channels (PHP >= 4.3.0)

Array[5] = bits (PHP >= 4.3.0)

Array[6] = mime (PHP >= 4.3.0)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.