int pget(int x, int y, int z)


The x coordinate of the pixel to be retrieved.
The y coordinate of the pixel to be retrieved.
The channel number to be retrieved for the pixel: 0->red, 1->green, 2->blue, 3->alpha.


The integer value of the specified pixel for the specified channel, in the output buffer.


This function retrieves the value of a specified channel 'z' from the image pixel at position (x,y) in the output buffer; in effect, it serves a similar purpose to the src() function, but retrieves from the output buffer rather than the source image. The coordinates should usually be within the image, i.e. 0<=x<X and 0<=y<Y, while the channel number z should be in the range 0 to 3 inclusive. Channels 0, 1 and 2 are the red, green and blue channels respectively, while channel 3 is the alpha (transparency) channel and is valid only on a layer. Note that use of the pget() function in the ForEveryTile handler forces FilterMeister to handle the image as a single (and possibly large) tile.


// Shift the whole image one pixel left


R,G,B: pget(x+1, y, z)

A: a

Also see

src, tget, t2get, pset, tset, t2set


How is pget different from src? src gets the pixel from the original image while pget gets the pixel from the output buffer. At the start of the filter the output buffer is the same as the original image, which is why they seem identical. pget is useful for times when you modify the output, but still need data from the original image.