note 28008 rejected from ref.image by didou

From: Date: Sun, 25 May 2003 03:56:03 +0000
Subject: note 28008 rejected from ref.image by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-48969@lists.php.net to get a copy of this message
Note Submitter: Enrique Garcia M. ---- I'm trying to upload a PNG file, but the simple switch case IMG_PNG doesn't function. Then viewing the code returned I get: array(6) { [0]=> int(1599) [1]=> int(816) [2]=> int(3) [3]=> string(25) "width="1599" height="816"" ["bits"]=> int(8) ["mime"]=> string(9) "image/png" } And jpeg = 2, gif = 1, wbmp = 8, jpg = 2, png = 4, xpm = 16 So, what is 3 ($imageinfo[2]) ? Then I write the case with: switch($imageinfo[2]) { case IMG_GIF + IMG_JPG: case IMG_PNG: $im = @imagecreatefrompng($_FILES['picture']['tmp_name']); break; } The image was loaded and all the gd code work ok...

« previous php.notes (#48969) next »