Re: how to detect type of image

From: Date: Sat, 28 Apr 2007 20:48:33 +0000
Subject: Re: how to detect type of image
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-254076@lists.php.net to get a copy of this message
If it's critical that you can detect the image type accurately, I'd suggest using ImageMagick's "identify" command. It will tell you about everything that you'd ever want to know about an image. http://www.imagemagick.org/script/index.php Post your question on their forum http://www.imagemagick.org/discourse-server/ Alain Roger wrote:
Hi, In my web application, end user is able to load images (png, jpeg, gif,..) into database. I would like to know how can i detect automatically the type of image (pnd, jpeg,...) ? i do not want to check the extension because this is easily faked... just by renaming it. Does it exist a technique for that ? thanks a lot,


« previous php.general (#254076) next »