Reading and writing pixels at X,Y
Hi all;
Very new to the SDK but making great progress.
I see that using the following function, we can write pixels at a coordinate (as opposed to iterating through every pixel):
PF_Pixel *sampleIntegral32(PF_EffectWorld &def, int x, int y){
return (PF_Pixel*)((char*)def.data +
(y * def.rowbytes) +
(x * sizeof(PF_Pixel)));
}
And then we call it using:
PF_Pixel *myPixel = sampleIntegral32(*output,x,y);
myPixel->red = 255;
myPixel->green = 255;
myPixel->blue = 255;
myPixel->alpha = 255;
But how does one read a pixel at X,Y?
Thanks,
-Richard
