Page 1 of 1

imagesx and imagesy???

Posted: Tue Aug 19, 2003 12:49 am
by Mr. Tech
Hi!

I have an upload script and need to read the height and width of the image. I tried this but it doesn't seem to work:

Code: Select all

<?php
$im = $_FILES['file']['tmp_name'];

$width = imagesx($im);
$height = imagesy($im);
?>
And there example doesn't help either...

http://au.php.net/manual/en/function.imagesy.php
http://au.php.net/manual/en/function.imagesx.php

Anyone know how I can do it?

Posted: Tue Aug 19, 2003 4:40 am
by twigletmac
Have you tried getimagesize()?

Mac

Posted: Tue Aug 19, 2003 4:35 pm
by Mr. Tech
No. Thanks, I'll give it a try!