Lines Matching refs:src

13 #define GET_PIXEL_FUNCTION(src)(src->trueColor?gdImageGetTrueColorPixel:gdImageGetPixel)  argument
16 int gdImageNegate(gdImagePtr src) in gdImageNegate() argument
24 if (src==NULL) { in gdImageNegate()
28 f = GET_PIXEL_FUNCTION(src); in gdImageNegate()
30 for (y=0; y<src->sy; ++y) { in gdImageNegate()
31 for (x=0; x<src->sx; ++x) { in gdImageNegate()
32 pxl = f (src, x, y); in gdImageNegate()
33 r = gdImageRed(src, pxl); in gdImageNegate()
34 g = gdImageGreen(src, pxl); in gdImageNegate()
35 b = gdImageBlue(src, pxl); in gdImageNegate()
36 a = gdImageAlpha(src, pxl); in gdImageNegate()
38 new_pxl = gdImageColorAllocateAlpha(src, 255-r, 255-g, 255-b, a); in gdImageNegate()
40 new_pxl = gdImageColorClosestAlpha(src, 255-r, 255-g, 255-b, a); in gdImageNegate()
42 gdImageSetPixel (src, x, y, new_pxl); in gdImageNegate()
49 int gdImageGrayScale(gdImagePtr src) in gdImageGrayScale() argument
58 f = GET_PIXEL_FUNCTION(src); in gdImageGrayScale()
60 if (src==NULL) { in gdImageGrayScale()
64 alpha_blending = src->alphaBlendingFlag; in gdImageGrayScale()
65 gdImageAlphaBlending(src, gdEffectReplace); in gdImageGrayScale()
67 for (y=0; y<src->sy; ++y) { in gdImageGrayScale()
68 for (x=0; x<src->sx; ++x) { in gdImageGrayScale()
69 pxl = f (src, x, y); in gdImageGrayScale()
70 r = gdImageRed(src, pxl); in gdImageGrayScale()
71 g = gdImageGreen(src, pxl); in gdImageGrayScale()
72 b = gdImageBlue(src, pxl); in gdImageGrayScale()
73 a = gdImageAlpha(src, pxl); in gdImageGrayScale()
76 new_pxl = gdImageColorAllocateAlpha(src, r, g, b, a); in gdImageGrayScale()
78 new_pxl = gdImageColorClosestAlpha(src, r, g, b, a); in gdImageGrayScale()
80 gdImageSetPixel (src, x, y, new_pxl); in gdImageGrayScale()
83 gdImageAlphaBlending(src, alpha_blending); in gdImageGrayScale()
89 int gdImageBrightness(gdImagePtr src, int brightness) in gdImageBrightness() argument
96 f = GET_PIXEL_FUNCTION(src); in gdImageBrightness()
98 if (src==NULL || (brightness < -255 || brightness>255)) { in gdImageBrightness()
106 for (y=0; y<src->sy; ++y) { in gdImageBrightness()
107 for (x=0; x<src->sx; ++x) { in gdImageBrightness()
108 pxl = f (src, x, y); in gdImageBrightness()
110 r = gdImageRed(src, pxl); in gdImageBrightness()
111 g = gdImageGreen(src, pxl); in gdImageBrightness()
112 b = gdImageBlue(src, pxl); in gdImageBrightness()
113 a = gdImageAlpha(src, pxl); in gdImageBrightness()
123 new_pxl = gdImageColorAllocateAlpha(src, (int)r, (int)g, (int)b, a); in gdImageBrightness()
125 new_pxl = gdImageColorClosestAlpha(src, (int)r, (int)g, (int)b, a); in gdImageBrightness()
127 gdImageSetPixel (src, x, y, new_pxl); in gdImageBrightness()
134 int gdImageContrast(gdImagePtr src, double contrast) in gdImageContrast() argument
143 f = GET_PIXEL_FUNCTION(src); in gdImageContrast()
145 if (src==NULL) { in gdImageContrast()
152 for (y=0; y<src->sy; ++y) { in gdImageContrast()
153 for (x=0; x<src->sx; ++x) { in gdImageContrast()
154 pxl = f(src, x, y); in gdImageContrast()
156 r = gdImageRed(src, pxl); in gdImageContrast()
157 g = gdImageGreen(src, pxl); in gdImageContrast()
158 b = gdImageBlue(src, pxl); in gdImageContrast()
159 a = gdImageAlpha(src, pxl); in gdImageContrast()
183 new_pxl = gdImageColorAllocateAlpha(src, (int)rf, (int)gf, (int)bf, a); in gdImageContrast()
185 new_pxl = gdImageColorClosestAlpha(src, (int)rf, (int)gf, (int)bf, a); in gdImageContrast()
187 gdImageSetPixel (src, x, y, new_pxl); in gdImageContrast()
194 int gdImageColor(gdImagePtr src, const int red, const int green, const int blue, const int alpha) in gdImageColor() argument
201 if (src == NULL) { in gdImageColor()
205 f = GET_PIXEL_FUNCTION(src); in gdImageColor()
207 for (y=0; y<src->sy; ++y) { in gdImageColor()
208 for (x=0; x<src->sx; ++x) { in gdImageColor()
211 pxl = f(src, x, y); in gdImageColor()
212 r = gdImageRed(src, pxl); in gdImageColor()
213 g = gdImageGreen(src, pxl); in gdImageColor()
214 b = gdImageBlue(src, pxl); in gdImageColor()
215 a = gdImageAlpha(src, pxl); in gdImageColor()
227 new_pxl = gdImageColorAllocateAlpha(src, r, g, b, a); in gdImageColor()
229 new_pxl = gdImageColorClosestAlpha(src, r, g, b, a); in gdImageColor()
231 gdImageSetPixel (src, x, y, new_pxl); in gdImageColor()
237 int gdImageConvolution(gdImagePtr src, float filter[3][3], float filter_div, float offset) in gdImageConvolution() argument
246 if (src==NULL) { in gdImageConvolution()
251 srcback = gdImageCreateTrueColor (src->sx, src->sy); in gdImageConvolution()
260 gdImageCopy(srcback, src,0,0,0,0,src->sx,src->sy); in gdImageConvolution()
262 f = GET_PIXEL_FUNCTION(src); in gdImageConvolution()
264 for ( y=0; y<src->sy; y++) { in gdImageConvolution()
265 for(x=0; x<src->sx; x++) { in gdImageConvolution()
271 int yv = MIN(MAX(y - 1 + j, 0), src->sy - 1); in gdImageConvolution()
273 pxl = f(srcback, MIN(MAX(x - 1 + i, 0), src->sx - 1), yv); in gdImageConvolution()
288 new_pxl = gdImageColorAllocateAlpha(src, (int)new_r, (int)new_g, (int)new_b, new_a); in gdImageConvolution()
290 new_pxl = gdImageColorClosestAlpha(src, (int)new_r, (int)new_g, (int)new_b, new_a); in gdImageConvolution()
292 gdImageSetPixel (src, x, y, new_pxl); in gdImageConvolution()
299 int gdImageSelectiveBlur( gdImagePtr src) in gdImageSelectiveBlur() argument
313 if (src==NULL) { in gdImageSelectiveBlur()
318 srcback = gdImageCreateTrueColor (src->sx, src->sy); in gdImageSelectiveBlur()
322 gdImageCopy(srcback, src,0,0,0,0,src->sx,src->sy); in gdImageSelectiveBlur()
324 f = GET_PIXEL_FUNCTION(src); in gdImageSelectiveBlur()
326 for(y = 0; y<src->sy; y++) { in gdImageSelectiveBlur()
327 for (x=0; x<src->sx; x++) { in gdImageSelectiveBlur()
329 cpxl = f(src, x, y); in gdImageSelectiveBlur()
336 pxl = f(src, x-(3>>1)+i, y-(3>>1)+j); in gdImageSelectiveBlur()
397 pxl = f(src, x-(3>>1)+i, y-(3>>1)+j); in gdImageSelectiveBlur()
407 new_pxl = gdImageColorAllocateAlpha(src, (int)new_r, (int)new_g, (int)new_b, new_a); in gdImageSelectiveBlur()
409 new_pxl = gdImageColorClosestAlpha(src, (int)new_r, (int)new_g, (int)new_b, new_a); in gdImageSelectiveBlur()
411 gdImageSetPixel (src, x, y, new_pxl); in gdImageSelectiveBlur()
418 int gdImageEdgeDetectQuick(gdImagePtr src) in gdImageEdgeDetectQuick() argument
424 return gdImageConvolution(src, filter, 1, 127); in gdImageEdgeDetectQuick()