Commit 4ec45165 authored by Sven Neumann's avatar Sven Neumann

another small cleanup

svn path=/trunk/; revision=26749
parent aa5cca00
......@@ -1616,14 +1616,11 @@ interpolate_bilinear_pr (PixelRegion *srcPR,
gint b;
gdouble sum, alphasum;
for (b = 0; b < bytes; b++)
pixel[b] = 0;
switch (bytes)
{
case 1:
sum = weighted_sum (xfrac, yfrac, p1[0], p2[0], p3[0], p4[0]);
pixel[0] = (guchar) CLAMP (sum, 0, 255);
sum = weighted_sum (xfrac, yfrac, p1[0], p2[0], p3[0], p4[0]);
pixel[0] = (guchar) CLAMP (sum, 0, 255);
break;
case 2:
......@@ -1636,6 +1633,10 @@ interpolate_bilinear_pr (PixelRegion *srcPR,
pixel[0] = (guchar) CLAMP (sum, 0, 255);
pixel[1] = (guchar) CLAMP (alphasum, 0, 255);
}
else
{
pixel[0] = pixel[1] = 0;
}
break;
case 3:
......@@ -1660,6 +1661,10 @@ interpolate_bilinear_pr (PixelRegion *srcPR,
pixel[3] = (guchar) CLAMP (alphasum, 0, 255);
}
else
{
pixel[0] = pixel[1] = pixel[2] = pixel[3] = 0;
}
break;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment