summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2007-06-17 16:51:50 +0000
committerPierre Joye <pajoye@php.net>2007-06-17 16:51:50 +0000
commitfcd0a1e790c25b357be50d3105b3ef20a3a1a5cd (patch)
treea4655e1e4df208337a4042051fc672f536d9cd96
parent32c5a87a148d49450afd869f1a611bdf669e986d (diff)
downloadphp-git-fcd0a1e790c25b357be50d3105b3ef20a3a1a5cd.tar.gz
- Drop useless tests (Daniel Diaz)
-rw-r--r--ext/gd/libgd/gd.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c
index 3ca009c8f2..9119a00b08 100644
--- a/ext/gd/libgd/gd.c
+++ b/ext/gd/libgd/gd.c
@@ -3657,9 +3657,7 @@ int gdImageNegate(gdImagePtr src)
if (new_pxl == -1) {
new_pxl = gdImageColorClosestAlpha(src, 255-r, 255-g, 255-b, a);
}
- if ((y >= 0) && (y < src->sy)) {
- gdImageSetPixel (src, x, y, new_pxl);
- }
+ gdImageSetPixel (src, x, y, new_pxl);
}
}
return 1;
@@ -3692,9 +3690,7 @@ int gdImageGrayScale(gdImagePtr src)
if (new_pxl == -1) {
new_pxl = gdImageColorClosestAlpha(src, r, g, b, a);
}
- if ((y >= 0) && (y < src->sy)) {
- gdImageSetPixel (src, x, y, new_pxl);
- }
+ gdImageSetPixel (src, x, y, new_pxl);
}
}
return 1;
@@ -3739,9 +3735,7 @@ int gdImageBrightness(gdImagePtr src, int brightness)
if (new_pxl == -1) {
new_pxl = gdImageColorClosestAlpha(src, (int)r, (int)g, (int)b, a);
}
- if ((y >= 0) && (y < src->sy)) {
- gdImageSetPixel (src, x, y, new_pxl);
- }
+ gdImageSetPixel (src, x, y, new_pxl);
}
}
return 1;
@@ -3801,9 +3795,7 @@ int gdImageContrast(gdImagePtr src, double contrast)
if (new_pxl == -1) {
new_pxl = gdImageColorClosestAlpha(src, (int)rf, (int)gf, (int)bf, a);
}
- if ((y >= 0) && (y < src->sy)) {
- gdImageSetPixel (src, x, y, new_pxl);
- }
+ gdImageSetPixel (src, x, y, new_pxl);
}
}
return 1;
@@ -3844,9 +3836,7 @@ int gdImageColor(gdImagePtr src, int red, int green, int blue)
if (new_pxl == -1) {
new_pxl = gdImageColorClosestAlpha(src, (int)r, (int)g, (int)b, a);
}
- if ((y >= 0) && (y < src->sy)) {
- gdImageSetPixel (src, x, y, new_pxl);
- }
+ gdImageSetPixel (src, x, y, new_pxl);
}
}
return 1;
@@ -3902,9 +3892,7 @@ int gdImageConvolution(gdImagePtr src, float filter[3][3], float filter_div, flo
if (new_pxl == -1) {
new_pxl = gdImageColorClosestAlpha(src, (int)new_r, (int)new_g, (int)new_b, new_a);
}
- if ((y >= 0) && (y < src->sy)) {
- gdImageSetPixel (src, x, y, new_pxl);
- }
+ gdImageSetPixel (src, x, y, new_pxl);
}
}
gdImageDestroy(srcback);
@@ -4024,9 +4012,7 @@ int gdImageSelectiveBlur( gdImagePtr src)
if (new_pxl == -1) {
new_pxl = gdImageColorClosestAlpha(src, (int)new_r, (int)new_g, (int)new_b, new_a);
}
- if ((y >= 0) && (y < src->sy)) {
- gdImageSetPixel (src, x, y, new_pxl);
- }
+ gdImageSetPixel (src, x, y, new_pxl);
}
}
gdImageDestroy(srcback);