note 108995 added to function.imagecreate

From: Date: Mon, 11 Jun 2012 13:32:20 +0000
Subject: note 108995 added to function.imagecreate
Groups: php.notes 
Request: Send a blank email to php-notes+get-188525@lists.php.net to get a copy of this message
function ImageCreateFromBMP($filename) if ($BMP['colors'] < 257) // to only handle 8-bit and less palettes { $used_colors = ( $BMP['colors_used'] ) ? $BMP['colors_used'] : $BMP['colors']; // incase all the colors arent used in the palette $PALETTE = unpack('V'.$used_colors, fread($f1,$used_colors*4)); // to convert negative signed integer numbers to unsigned foreach ( $PALETTE as $key => $value ) { if ( $value < 0 ) $PALETTE[$key] += 16777216; } } fseek( $f1, $FILE['bitmap_offset'] ); // make sure the image data is read from the correct location ---- Server IP: 69.147.83.197 Probable Submitter: 86.97.212.16 (proxied: 86.97.212.16) ---- Manual Page -- http://www.php.net/manual/en/function.imagecreate.php Edit -- https://master.php.net/note/edit/108995 Del: integrated -- https://master.php.net/note/delete/108995/integrated Del: useless -- https://master.php.net/note/delete/108995/useless Del: bad code -- https://master.php.net/note/delete/108995/bad+code Del: spam -- https://master.php.net/note/delete/108995/spam Del: non-english -- https://master.php.net/note/delete/108995/non-english Del: in docs -- https://master.php.net/note/delete/108995/in+docs Del: other reasons-- https://master.php.net/note/delete/108995 Reject -- https://master.php.net/note/reject/108995 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#188525) next »