public int filterRGB(int pX, int pY, int pARGB) {
        // Get color components
        int r = pARGB >> 16 & 0xFF;
        int g = pARGB >> 8 & 0xFF;
        int b = pARGB & 0xFF;

        // Scale to new contrast
        r = LUT[r];
        g = LUT[g];
        b = LUT[b];

        // Return ARGB pixel, leave transparency as is
        return (pARGB & 0xFF000000) | (r << 16) | (g << 8) | b;
    }
public int filterRGB ( int pX , int pY , int pARGB ) { int r = pARGB > > 16 & 0xFF ; int g = pARGB > > 8 & 0xFF ; int b = pARGB & 0xFF ; r = LUT [ r ] ; g = LUT [ g ] ; b = LUT [ b ] ; return ( pARGB & 0xFF000000 ) | ( r << 16 ) | ( g << 8 ) | b ; }
Filters one pixel, adjusting brightness and contrast according to this
filter.

@param pX x
@param pY y
@param pARGB pixel value in default color space

@return the filtered pixel value in the default color space