Chris is quoted as saying on 11/30/2004 2:53 PM:
imagesx() requires an image resource , not a file path. so you'd need to use one of the imagecreatefrom* functions to create the resource.

But it looks like all you want is the width and height of an image.... If so use get imagesize() ( which *does* except a pathname, not a resource)

Chris

http://www.php.net/image
http://www.php.net/getimagesize
<SNIP>
I had looked at get image size, but thought the other would be quicker...  ARGH.

$a=getimagesize($path);
$width = $a[0];
$width = $width/2;
$height = $a[1];
$height = $height/2;

works!!


-- Robert Sossomon, Business and Technology Application Technician 4-H Youth Development Department 200 Ricks Hall, Campus Box 7606 N.C. State University Raleigh NC 27695-7606 Phone: 919/515-8474 Fax: 919/515-7812 [EMAIL PROTECTED]

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to