note 41188 deleted from function.image-type-to-mime-type by aidan

From: Date: Sat, 11 Sep 2004 08:02:55 +0000
Subject: note 41188 deleted from function.image-type-to-mime-type by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-76461@lists.php.net to get a copy of this message
Note Submitter: theprofessor at gmx dot com ---- if you need this function in a php version < 4.3 use this function: <?php function image_type_to_mime_type($imagetype) { static $image_type_to_mime_type = array( 1 => 'image/gif', // IMAGETYPE_GIF 2 => 'image/jpeg', // IMAGETYPE_JPEG 3 => 'image/png', // IMAGETYPE_PNG 4 => 'application/x-shockwave-flash', // IMAGETYPE_SWF 5 => 'image/psd', // IMAGETYPE_PSD 6 => 'image/bmp', // IMAGETYPE_BMP 7 => 'image/tiff', // IMAGETYPE_TIFF_II (intel byte order) 8 => 'image/tiff', // IMAGETYPE_TIFF_MM (motorola byte order) 9 => 'application/octet-stream', // IMAGETYPE_JPC 10 => 'image/jp2', // IMAGETYPE_JP2 11 => 'application/octet-stream', // IMAGETYPE_JPX 12 => 'application/octet-stream', // IMAGETYPE_JB2 13 => 'application/x-shockwave-flash', // IMAGETYPE_SWC 14 => 'image/iff', // IMAGETYPE_IFF 15 => 'image/vnd.wap.wbmp', // IMAGETYPE_WBMP 16 => 'image/xbm'); // IMAGETYPE_XBM return (isset($image_type_to_mime_type[$imagetype]) ? $image_type_to_mime_type[$imagetype] : false); } ?>

« previous php.notes (#76461) next »