Re: [PEPr] Comment on Images::Thumbnail
| From: | Firman Wandayandi | Date: | Wed, 27 Apr 2005 08:21:39 +0000 |
| Subject: | Re: [PEPr] Comment on Images::Thumbnail | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-37423@lists.php.net to get a copy of this message | ||
On 4/27/05, Joshua Eichorn <josh@bluga.net> wrote:
> Firman Wandayandi wrote:
>
> >Firman Wandayandi (http://pear.php.net/user/firman) has commented on the proposal for
> >Images::Thumbnail.
> >
> >Comment:
> >
> >I agreed with Philipe, Image_Transform is able to do thumbnailing in
> >current release, but still lot of fixed, I dunno on CVS version. BTW if
> >thumbnailing will be handled by separated package, I think this should be
> >compatible with PHP4 same as Etienne's comment.
> >
> >::detectImageType() that's not good logic, use getimagesize(), and see
> >what the image type.
> >
> >You can eleminated ::saveThumbnail() and ::outputThumbnail(), just use the
> >same function, then detect the destination, if given save it to file,
> >otherwise send to browser.
> >
> >Proposal information:
> >http://pear.php.net/pepr/pepr-proposal-show.php?id=242
> >
> >
> >
> Be careful using getimagesize() to detect if you have an image since its
> lame and throws a warning when its fed anything that isn't an image.
> -josh
>
Right Josh, use @getimagesize($filename) and === false operator, if
FALSE returned that's not an image or not supported, or corrupt image
file.
--
Firman Wandayandi : Never Dreamt Before