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

2012-01-23 Thread Nicholas Cooper
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

Re: [PHP] Reading only RGB portion of an image, file_get_conents minus file headers etc

2012-01-23 Thread Matijn Woudt
On Mon, Jan 23, 2012 at 1:51 PM, Nicholas Cooper nicho...@twpagency.com wrote: 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

Re: [PHP] Reading only RGB portion of an image, file_get_conents minus file headers etc

2012-01-23 Thread Nicholas Cooper
On 23 January 2012 13:26, Matijn Woudt tijn...@gmail.com wrote: On Mon, Jan 23, 2012 at 1:51 PM, Nicholas Cooper nicho...@twpagency.com wrote: 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

Re: [PHP] Reading only RGB portion of an image, file_get_conents minus file headers etc

2012-01-23 Thread Matijn Woudt
On Mon, Jan 23, 2012 at 3:26 PM, Nicholas Cooper nicho...@twpagency.com wrote: On 23 January 2012 13:26, Matijn Woudt tijn...@gmail.com wrote: On Mon, Jan 23, 2012 at 1:51 PM, Nicholas Cooper nicho...@twpagency.com wrote: Hi everyone, I've created an image in RGB from ImageMagick, it's 4 by

Re: [PHP] Reading only RGB portion of an image, file_get_conents minus file headers etc

2012-01-23 Thread Nicholas Cooper
On 23 January 2012 14:34, Matijn Woudt tijn...@gmail.com wrote: On Mon, Jan 23, 2012 at 3:26 PM, Nicholas Cooper nicho...@twpagency.com wrote: On 23 January 2012 13:26, Matijn Woudt tijn...@gmail.com wrote: On Mon, Jan 23, 2012 at 1:51 PM, Nicholas Cooper nicho...@twpagency.com wrote: Hi

Re: [PHP] Reading only RGB portion of an image, file_get_conents minus file headers etc

2012-01-23 Thread Alex Nikitin
If you don't mind me asking, if you want performance, which is kind of essential if you are processing a large number of files, why are you doing it in PHP? -- The trouble with programmers is that you can never tell what a programmer is doing until it’s too late.  ~Seymour Cray -- PHP General

Re: [PHP] Reading only RGB portion of an image, file_get_conents minus file headers etc

2012-01-23 Thread Robert Cummings
On 12-01-23 01:32 PM, Alex Nikitin wrote: If you don't mind me asking, if you want performance, which is kind of essential if you are processing a large number of files, why are you doing it in PHP? -- The trouble with programmers is that you can never tell what a programmer is doing until it’s

Re: [PHP] Reading only RGB portion of an image, file_get_conents minus file headers etc

2012-01-23 Thread Alex Nikitin
Have you done image processing? In my experience, with image generation, photography and processing, typically you are bound by resources when processing large amount of files than your connection, or sometimes even disk io. -- The trouble with programmers is that you can never tell what a

Re: [PHP] Reading only RGB portion of an image, file_get_conents minus file headers etc

2012-01-23 Thread Robert Cummings
On 12-01-23 09:29 PM, Alex Nikitin wrote: Have you done image processing? In my experience, with image generation, photography and processing, typically you are bound by resources when processing large amount of files than your connection, or sometimes even disk io. It really depends on what

Re: [PHP] Reading only RGB portion of an image, file_get_conents minus file headers etc

2012-01-23 Thread Alex Nikitin
Absolutely agreed. A part of what i was asking deals with what he is actually doing... -- The trouble with programmers is that you can never tell what a programmer is doing until it’s too late.  ~Seymour Cray On Mon, Jan 23, 2012 at 9:37 PM, Robert Cummings rob...@interjinn.com wrote: On