| 
 Posted by Andy Hassall on 11/04/05 19:51 
On 4 Nov 2005 09:42:55 -0800, lkrubner@geocities.com wrote: 
 
>How do I get an image like that, as a stream of bytes? Which function 
>do I use? 
 
 Where are you getting it from? 
 What format is the image in? 
 
 You probably want a sequence of: 
 
http://uk.php.net/file_get_contents - get the image from a file or URL 
 
http://uk.php.net/imagecreatefromstring - create a GD image object 
 
http://uk.php.net/manual/en/function.imagesx.php 
http://uk.php.net/manual/en/function.imagesy.php 
http://uk.php.net/manual/en/function.imagecolorat.php 
 
 - loop over all the pixels in the image, converting to whatever your 
representation is (looks like hex representation of brightness level in a 
greyscale image?) 
--  
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk 
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
 
  
Navigation:
[Reply to this message] 
 |