note 99151 deleted from function.imagepng by danbrown

From: Date: Fri, 30 Jul 2010 14:54:19 +0000
Subject: note 99151 deleted from function.imagepng by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-171232@lists.php.net to get a copy of this message
Note Submitter: a dot vanderkolk at gmail dot com Reason: useless ---- Yes that really sucks wietse89. I had created a way to dynamically call the image'mimetype' functions. <?php $size = getimagesize( $file ); $type = substr( $size[ 'mime' ], 6 ); // cut off 'image/' if( $type != 'jpeg' && $type == 'gif' && $type != 'png' ) throw new Exception( 'File type not allowed' ); $func = 'image'.$type; $func( $image, $file ); ?> Now I cannot add-in a dynamic quality and I have to refactor my code :(

« previous php.notes (#171232) next »