You might take a look at Imagemagic to see how they do it.

Richard Davey wrote:
Hi php-general collective,

I'm building up some image data in my PHP script (ready for output to
the browser). Having to do some complex per pixel manipulation, which
is fine - but I'm just wondering is there a quicker / more efficient
way of storing the pixel data than in an array?

At the moment I hold it in $array[$x][$y], which makes the drawing
loop painless, but it's creating an array with 307,200 elements which
is proving to be quite slow. As I'm only storing fixed width byte
values is there an alternative method? For example the ability to
read/write to a chunk of memory instead? (so I can read out whole
strips of data rather than one by one?)

I was looking at the Shared Memory functions, but that isn't exactly
what I need (I don't want it shared, I want it process specific)

Cheers,

Rich

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to