Re: Image size check
| From: | Rasmus Lerdorf | Date: | Tue, 07 Nov 2000 18:28:52 +0000 |
| Subject: | Re: Image size check | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-24138@lists.php.net to get a copy of this message | ||
The argument to imagesx() is the return value from one of the ImageCreate
functions, not a filename.
If you want to pass a filename, use GetImageSize() instead. See:
http://www.php.net/manual/function.getimagesize.php
-Rasmus
On Tue, 7 Nov 2000, Abe wrote:
> Hi there,
>
> I wonder if you can help, I seem to get an error with this script. I am
> using PHP 3.0.15 on Linux:
>
> ----------------------------------------------------------------------------
> -----------------------------------
> <?
> $name = "/home/etc/etc/etc...../images/ptrs_on.gif";
> $test = ImageSX ($name);
> echo "Size is $test";
> ?>
> ----------------------------------------------------------------------------
> -----------------------------------
>
> The error message I get is:
> ----------------------------------------------------------------------------
> -----------------------------------
> Warning: Unable to find image pointer in
> /home/httpd/groups/nds/htdocs/images/imagesize2.php3 on line 7
> size is
> ----------------------------------------------------------------------------
> -----------------------------------
> Any ideas would be appreciated.
>
> Thanks
> Abe
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>