Ok I'll be very short and very precise: it's simply an image manipulation request that does almost nothing. The first part I already did, it's on the last 2 steps I'm asking for help.
You input an image $im_input (in for example .jpg format) and find its size.
for pixels 0 to $width, 0 to $height you make 3 arrays from the colorat:
$red[$x][$y] = ...;
$green[$x][$y] = ...;
$blue[$x][$y] = ...;
Then, manipulation the arrays in some way (like eum.. just halving blue... or whatever)
Composing the arrays into a new image ($im_output)
Now here's the problem
: I can't get the right colors in my image. It does output, but unexpected results.
I did: imagecreatetruecolor($width, $height)
and said the $newcolor[$x][$y] = 256*256*$red[$x][$y]+256*$green[$x][$y]+$blue[$x][$y]; as argument for imagesetpixel()
But when writing the final image to a file, that resulted in strange results (not the expected color anyways).
Any help on this would be GREATLY appreciated!!