gimp r26781 - trunk/app/paint-funcs
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26781 - trunk/app/paint-funcs
- Date: Tue, 26 Aug 2008 19:55:12 +0000 (UTC)
Author: neo
Date: Tue Aug 26 19:55:12 2008
New Revision: 26781
URL: http://svn.gnome.org/viewvc/gimp?rev=26781&view=rev
Log:
removed unneeded casts
Modified:
trunk/app/paint-funcs/scale-region.c
Modified: trunk/app/paint-funcs/scale-region.c
==============================================================================
--- trunk/app/paint-funcs/scale-region.c (original)
+++ trunk/app/paint-funcs/scale-region.c Tue Aug 26 19:55:12 2008
@@ -905,10 +905,12 @@
s4[16 + b] * s4[19]);
sum /= alphasum;
+
pixel[b] = CLAMP (sum, 0, 255);
}
alpha = alphasum / 1024;
+
pixel[3] = CLAMP (alpha, 0, 255);
}
else
@@ -1038,7 +1040,8 @@
{
case 1:
sum = weighted_sum (xfrac, yfrac, p1[0], p2[0], p3[0], p4[0]);
- pixel[0] = (guchar) CLAMP (sum, 0, 255);
+
+ pixel[0] = CLAMP (sum, 0, 255);
break;
case 2:
@@ -1050,8 +1053,8 @@
p3[0] * p3[1], p4[0] * p4[1]);
sum /= alphasum;
- pixel[0] = (guchar) CLAMP (sum, 0, 255);
- pixel[1] = (guchar) CLAMP (alphasum, 0, 255);
+ pixel[0] = CLAMP (sum, 0, 255);
+ pixel[1] = CLAMP (alphasum, 0, 255);
}
else
{
@@ -1063,7 +1066,8 @@
for (b = 0; b < 3; b++)
{
sum = weighted_sum (xfrac, yfrac, p1[b], p2[b], p3[b], p4[b]);
- pixel[b] = (guchar) CLAMP (sum, 0, 255);
+
+ pixel[b] = CLAMP (sum, 0, 255);
}
break;
@@ -1077,10 +1081,11 @@
p1[b] * p1[3], p2[b] * p2[3],
p3[b] * p3[3], p4[b] * p4[3]);
sum /= alphasum;
- pixel[b] = (guchar) CLAMP (sum, 0, 255);
+
+ pixel[b] = CLAMP (sum, 0, 255);
}
- pixel[3] = (guchar) CLAMP (alphasum, 0, 255);
+ pixel[3] = CLAMP (alphasum, 0, 255);
}
else
{
@@ -1137,7 +1142,7 @@
sum = cubic_spline_fit (yfrac, p0, p1, p2, p3);
- pixel[0]= (guchar) CLAMP (sum, 0, 255);
+ pixel[0]= CLAMP (sum, 0, 255);
break;
case 2:
@@ -1166,8 +1171,8 @@
sum = cubic_spline_fit (yfrac, p0, p1, p2, p3);
sum /= alphasum;
- pixel[0] = (guchar) CLAMP (sum, 0, 255);
- pixel[1] = (guchar) CLAMP (alphasum, 0, 255);
+ pixel[0] = CLAMP (sum, 0, 255);
+ pixel[1] = CLAMP (alphasum, 0, 255);
}
else
{
@@ -1185,7 +1190,7 @@
sum = cubic_spline_fit (yfrac, p0, p1, p2, p3);
- pixel[b] = (guchar) CLAMP (sum, 0, 255);
+ pixel[b] = CLAMP (sum, 0, 255);
}
break;
@@ -1217,10 +1222,10 @@
sum = cubic_spline_fit (yfrac, p0, p1, p2, p3);
sum /= alphasum;
- pixel[b] = (guchar) CLAMP (sum, 0, 255);
+ pixel[b] = CLAMP (sum, 0, 255);
}
- pixel[3] = (guchar) CLAMP (alphasum, 0, 255);
+ pixel[3] = CLAMP (alphasum, 0, 255);
}
else
{
@@ -1331,7 +1336,7 @@
case 1:
sum = lanczos3_mul (src, x_kernel, y_kernel, stride, 1, 0);
- pixel[0] = CLAMP ((gint) sum, 0, 255);
+ pixel[0] = CLAMP (sum, 0, 255);
break;
case 2:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]