Re: using getimagesize on remote files
| From: | Andrew Brampton | Date: | Mon, 21 Apr 2003 05:47:44 +0000 |
| Subject: | Re: using getimagesize on remote files | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144604@lists.php.net to get a copy of this message | ||
Since I'm bored I just did a quick google and I found this:
http://mike.nux.co.uk/ImageInformation/
Its a PHP Class which can: "determine
if the file is a BMP, GIF, JPEG or PNG. It will also extract
other generic information about the image, including resolution,
height and width (without using the builtin GetImageSize() function)
as well as other image type specific information."
It does however only work on local files, so its your job if you chose to
accept it to bring the file to your webserver (or atleast some of it) before
you use the class.
Enjoy
Andrew
----- Original Message -----
From: "Andrew Brampton" <andrew@bramp.freeserve.co.uk>
To: "Joseph Bannon" <joethedev@yahoo.com>; <php-general@lists.php.net>
Sent: Monday, April 21, 2003 6:26 AM
Subject: Re: [PHP] using getimagesize on remote files
> If you want to save bandwidth I bet it would be easy enough to write your
> own getImageSize function which uses fopen and on fread to get the header
of
> the gif/jpg file then you parse it yourself. You could even code your own
> caching system if you wanted. You would need to look up the gif/jpg image
> formats which are available at www.wotsit.org.
>
> Andrew
> ----- Original Message -----
> From: "Joseph Bannon" <joethedev@yahoo.com>
> To: <php-general@lists.php.net>
> Sent: Monday, April 21, 2003 5:54 AM
> Subject: Re: [PHP] using getimagesize on remote files
>
>
> > > There is no way to fetch just the size, it fetches
> > > the entire image.
> >
> >
> > Serious? Well, this is good to know. I guess I'm
> > wasting bandwidth then.
> >
> > Thanks,
> > J.
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
> > http://platinum.yahoo.com
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>