diff options
Diffstat (limited to 'Build/source/libs/gd/libgd-src/src/gd_filter.c')
-rw-r--r-- | Build/source/libs/gd/libgd-src/src/gd_filter.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Build/source/libs/gd/libgd-src/src/gd_filter.c b/Build/source/libs/gd/libgd-src/src/gd_filter.c index c81e1c177e5..7855190f090 100644 --- a/Build/source/libs/gd/libgd-src/src/gd_filter.c +++ b/Build/source/libs/gd/libgd-src/src/gd_filter.c @@ -537,6 +537,7 @@ BGD_DECLARE(int) gdImageConvolution(gdImagePtr src, float filter[3][3], float fi for ( y=0; y<src->sy; y++) { for(x=0; x<src->sx; x++) { new_r = new_g = new_b = 0; + pxl = f(srcback, x, y); new_a = gdImageAlpha(srcback, pxl); for (j=0; j<3; j++) { @@ -898,7 +899,7 @@ applyCoeffsLine(gdImagePtr src, gdImagePtr dst, int line, int linelen, const int srcpx = (axis == HORIZONTAL) ? src->tpixels[line][rndx] : src->tpixels[rndx][line]; - + r += coeff * (double)gdTrueColorGetRed(srcpx); g += coeff * (double)gdTrueColorGetGreen(srcpx); b += coeff * (double)gdTrueColorGetBlue(srcpx); @@ -912,7 +913,7 @@ applyCoeffsLine(gdImagePtr src, gdImagePtr dst, int line, int linelen, static void -applyCoeffs(gdImagePtr src, gdImagePtr dst, double *coeffs, int radius, +applyCoeffs(gdImagePtr src, gdImagePtr dst, double *coeffs, int radius, gdAxis axis) { int line, numlines, linelen; @@ -939,7 +940,7 @@ applyCoeffs(gdImagePtr src, gdImagePtr dst, double *coeffs, int radius, _radius_ is a radius, not a diameter so a radius of 2 (for example) will blur across a region 5 pixels across (2 to the center, 1 for the center itself and another 2 to the other edge). - + _sigma_ represents the "fatness" of the curve (lower == fatter). If _sigma_ is less than or equal to 0, <gdImageCopyGaussianBlurred> ignores it and instead computes an @@ -987,10 +988,10 @@ applyCoeffs(gdImagePtr src, gdImagePtr dst, double *coeffs, int radius, FILE *in; gdImagePtr result, src; - + in = fopen("foo.png", "rb"); src = gdImageCreateFromPng(in); - + result = gdImageCopyGaussianBlurred(im, src->sx / 10, -1.0); (end code) @@ -1034,7 +1035,7 @@ gdImageCopyGaussianBlurred(gdImagePtr src, int radius, double sigma) gdFree(coeffs); return NULL; }/* if */ - + freeSrc = 1; }/* if */ @@ -1059,4 +1060,3 @@ gdImageCopyGaussianBlurred(gdImagePtr src, int radius, double sigma) return result; }/* gdImageCopyGaussianBlurred*/ - |