i was thinking of using something like AMFPHP for this. because the current method i used ... what other methods can i use?
in AS:
looping thru the pixels and getting the hex value of the pixel
Code: Select all
for (var a = 0; a<=w; a++) { //width
for (var b = 0; b<=h; b++) { //height
var tmp = snapshot.getPixel(a, b).toString(16);
pixels.push(tmp); // push values into the array
}
}Code: Select all
for($x=0; $x<=$width; $x++){ // for every x pixels
for($y=0; $y<=$height; $y++){ // for every y pixels of x
$int = hexdec($data[$i++]);
$color = ImageColorAllocate ($image, 0xFF & ($int >> 0x10), 0xFF & ($int >> 0x8), 0xFF & $int);
imagesetpixel ( $image , $x , $y , $color );
}
}Code: Select all
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 71 bytes) in .../upload.php on line 10