Lines Matching refs:src

21 #define GET_PIXEL_FUNCTION(src)(src->trueColor?gdImageGetTrueColorPixel:gdImageGetPixel)  argument
114 int gdImageNegate(gdImagePtr src) in gdImageNegate() argument
122 if (src==NULL) { in gdImageNegate()
126 f = GET_PIXEL_FUNCTION(src); in gdImageNegate()
128 for (y=0; y<src->sy; ++y) { in gdImageNegate()
129 for (x=0; x<src->sx; ++x) { in gdImageNegate()
130 pxl = f (src, x, y); in gdImageNegate()
131 r = gdImageRed(src, pxl); in gdImageNegate()
132 g = gdImageGreen(src, pxl); in gdImageNegate()
133 b = gdImageBlue(src, pxl); in gdImageNegate()
134 a = gdImageAlpha(src, pxl); in gdImageNegate()
136 new_pxl = gdImageColorAllocateAlpha(src, 255-r, 255-g, 255-b, a); in gdImageNegate()
138 new_pxl = gdImageColorClosestAlpha(src, 255-r, 255-g, 255-b, a); in gdImageNegate()
140 gdImageSetPixel (src, x, y, new_pxl); in gdImageNegate()
147 int gdImageGrayScale(gdImagePtr src) in gdImageGrayScale() argument
156 f = GET_PIXEL_FUNCTION(src); in gdImageGrayScale()
158 if (src==NULL) { in gdImageGrayScale()
162 alpha_blending = src->alphaBlendingFlag; in gdImageGrayScale()
163 gdImageAlphaBlending(src, gdEffectReplace); in gdImageGrayScale()
165 for (y=0; y<src->sy; ++y) { in gdImageGrayScale()
166 for (x=0; x<src->sx; ++x) { in gdImageGrayScale()
167 pxl = f (src, x, y); in gdImageGrayScale()
168 r = gdImageRed(src, pxl); in gdImageGrayScale()
169 g = gdImageGreen(src, pxl); in gdImageGrayScale()
170 b = gdImageBlue(src, pxl); in gdImageGrayScale()
171 a = gdImageAlpha(src, pxl); in gdImageGrayScale()
174 new_pxl = gdImageColorAllocateAlpha(src, r, g, b, a); in gdImageGrayScale()
176 new_pxl = gdImageColorClosestAlpha(src, r, g, b, a); in gdImageGrayScale()
178 gdImageSetPixel (src, x, y, new_pxl); in gdImageGrayScale()
181 gdImageAlphaBlending(src, alpha_blending); in gdImageGrayScale()
187 int gdImageBrightness(gdImagePtr src, int brightness) in gdImageBrightness() argument
194 f = GET_PIXEL_FUNCTION(src); in gdImageBrightness()
196 if (src==NULL || (brightness < -255 || brightness>255)) { in gdImageBrightness()
204 for (y=0; y<src->sy; ++y) { in gdImageBrightness()
205 for (x=0; x<src->sx; ++x) { in gdImageBrightness()
206 pxl = f (src, x, y); in gdImageBrightness()
208 r = gdImageRed(src, pxl); in gdImageBrightness()
209 g = gdImageGreen(src, pxl); in gdImageBrightness()
210 b = gdImageBlue(src, pxl); in gdImageBrightness()
211 a = gdImageAlpha(src, pxl); in gdImageBrightness()
221 new_pxl = gdImageColorAllocateAlpha(src, (int)r, (int)g, (int)b, a); in gdImageBrightness()
223 new_pxl = gdImageColorClosestAlpha(src, (int)r, (int)g, (int)b, a); in gdImageBrightness()
225 gdImageSetPixel (src, x, y, new_pxl); in gdImageBrightness()
232 int gdImageContrast(gdImagePtr src, double contrast) in gdImageContrast() argument
241 f = GET_PIXEL_FUNCTION(src); in gdImageContrast()
243 if (src==NULL) { in gdImageContrast()
250 for (y=0; y<src->sy; ++y) { in gdImageContrast()
251 for (x=0; x<src->sx; ++x) { in gdImageContrast()
252 pxl = f(src, x, y); in gdImageContrast()
254 r = gdImageRed(src, pxl); in gdImageContrast()
255 g = gdImageGreen(src, pxl); in gdImageContrast()
256 b = gdImageBlue(src, pxl); in gdImageContrast()
257 a = gdImageAlpha(src, pxl); in gdImageContrast()
281 new_pxl = gdImageColorAllocateAlpha(src, (int)rf, (int)gf, (int)bf, a); in gdImageContrast()
283 new_pxl = gdImageColorClosestAlpha(src, (int)rf, (int)gf, (int)bf, a); in gdImageContrast()
285 gdImageSetPixel (src, x, y, new_pxl); in gdImageContrast()
292 int gdImageColor(gdImagePtr src, const int red, const int green, const int blue, const int alpha) in gdImageColor() argument
299 if (src == NULL) { in gdImageColor()
303 f = GET_PIXEL_FUNCTION(src); in gdImageColor()
305 for (y=0; y<src->sy; ++y) { in gdImageColor()
306 for (x=0; x<src->sx; ++x) { in gdImageColor()
309 pxl = f(src, x, y); in gdImageColor()
310 r = gdImageRed(src, pxl); in gdImageColor()
311 g = gdImageGreen(src, pxl); in gdImageColor()
312 b = gdImageBlue(src, pxl); in gdImageColor()
313 a = gdImageAlpha(src, pxl); in gdImageColor()
325 new_pxl = gdImageColorAllocateAlpha(src, r, g, b, a); in gdImageColor()
327 new_pxl = gdImageColorClosestAlpha(src, r, g, b, a); in gdImageColor()
329 gdImageSetPixel (src, x, y, new_pxl); in gdImageColor()
335 int gdImageConvolution(gdImagePtr src, float filter[3][3], float filter_div, float offset) in gdImageConvolution() argument
344 if (src==NULL) { in gdImageConvolution()
349 srcback = gdImageCreateTrueColor (src->sx, src->sy); in gdImageConvolution()
358 gdImageCopy(srcback, src,0,0,0,0,src->sx,src->sy); in gdImageConvolution()
360 f = GET_PIXEL_FUNCTION(src); in gdImageConvolution()
362 for ( y=0; y<src->sy; y++) { in gdImageConvolution()
363 for(x=0; x<src->sx; x++) { in gdImageConvolution()
369 int yv = MIN(MAX(y - 1 + j, 0), src->sy - 1); in gdImageConvolution()
371 pxl = f(srcback, MIN(MAX(x - 1 + i, 0), src->sx - 1), yv); in gdImageConvolution()
386 new_pxl = gdImageColorAllocateAlpha(src, (int)new_r, (int)new_g, (int)new_b, new_a); in gdImageConvolution()
388 new_pxl = gdImageColorClosestAlpha(src, (int)new_r, (int)new_g, (int)new_b, new_a); in gdImageConvolution()
390 gdImageSetPixel (src, x, y, new_pxl); in gdImageConvolution()
397 int gdImageSelectiveBlur( gdImagePtr src) in gdImageSelectiveBlur() argument
411 if (src==NULL) { in gdImageSelectiveBlur()
416 srcback = gdImageCreateTrueColor (src->sx, src->sy); in gdImageSelectiveBlur()
420 gdImageCopy(srcback, src,0,0,0,0,src->sx,src->sy); in gdImageSelectiveBlur()
422 f = GET_PIXEL_FUNCTION(src); in gdImageSelectiveBlur()
424 for(y = 0; y<src->sy; y++) { in gdImageSelectiveBlur()
425 for (x=0; x<src->sx; x++) { in gdImageSelectiveBlur()
427 cpxl = f(src, x, y); in gdImageSelectiveBlur()
434 pxl = f(src, x-(3>>1)+i, y-(3>>1)+j); in gdImageSelectiveBlur()
495 pxl = f(src, x-(3>>1)+i, y-(3>>1)+j); in gdImageSelectiveBlur()
505 new_pxl = gdImageColorAllocateAlpha(src, (int)new_r, (int)new_g, (int)new_b, new_a); in gdImageSelectiveBlur()
507 new_pxl = gdImageColorClosestAlpha(src, (int)new_r, (int)new_g, (int)new_b, new_a); in gdImageSelectiveBlur()
509 gdImageSetPixel (src, x, y, new_pxl); in gdImageSelectiveBlur()
516 int gdImageEdgeDetectQuick(gdImagePtr src) in gdImageEdgeDetectQuick() argument
522 return gdImageConvolution(src, filter, 1, 127); in gdImageEdgeDetectQuick()