Reading only RGB portion of an image, file_get_conents minus file headers etc

From: Date: Mon, 23 Jan 2012 12:51:35 +0000
Subject: Reading only RGB portion of an image, file_get_conents minus file headers etc
Groups: php.general 
Request: Send a blank email to php-general+get-316355@lists.php.net to get a copy of this message
Hi everyone, I've created an image in RGB from ImageMagick, it's 4 by 4 so I'm expecting 48 numbers (4*4*3). [width*height*(R,G,B)] When I read the file with PHP and unpack it I get between 330 and 333, I guess this difference is down to headers and end of file data. Is there anyway to access only the useful image bits, those 48 numbers? Thank you, Nicholas Cooper

« previous php.general (#316355) next »