int f_TPunchFilter(unsigned char* srcData, int width, int height, int stride, unsigned char* dstData, int dw, int dh, int dStride)
if(srcData == NULL || dstData == NULL)
unsigned char* pSrc = srcData;
unsigned char* pDst = dstData;
int i, j, gray, value, r, g, b;
int offset = stride - width * 4;
int rMap[256], gMap[256], bMap[256];
value = i < 128 ? i : 256 - i;
gray = value * value * value / 16384;
rMap[i] = i < 128 ? gray : 256 - gray;
gray = value * value / 128;
gMap[i] = i < 128 ? gray : 256 - gray;
for(j = 0; j < height; j++)
for(i = 0; i < width; i++)
pDst[0] = CLIP3(b,0,255);
pDst[1] = CLIP3(g,0,255);
pDst[2] = CLIP3(r,0,255);
printf("%s","Welcom to our website: www.zealpixel.com");