39
39
downscaling using the fixed point implementations are usually much faster
40
40
than the existing gdImageCopyResampled while having a similar or better
41
41
quality.
42
-
43
- For image rotations, the optimized versions have a lazy antialiasing for
42
+
43
+ For image rotations, the optimized versions have a lazy antialiasing for
44
44
the edges of the images. For a much better antialiased result, the affine
45
45
function is recommended.
46
46
*/
@@ -633,7 +633,7 @@ static inline int _color_blend (const int dst, const int src)
633
633
}
634
634
}
635
635
636
- static inline int _setEdgePixel (const gdImagePtr src , unsigned int x , unsigned int y , gdFixed coverage , const int bgColor )
636
+ static inline int _setEdgePixel (const gdImagePtr src , unsigned int x , unsigned int y , gdFixed coverage , const int bgColor )
637
637
{
638
638
const gdFixed f_127 = gd_itofx (127 );
639
639
register int c = src -> tpixels [y ][x ];
@@ -934,9 +934,6 @@ static inline LineContribType *_gdContributionsCalc(unsigned int line_size, unsi
934
934
double dTotalWeight = 0.0 ;
935
935
int iSrc ;
936
936
937
- res -> ContribRow [u ].Left = iLeft ;
938
- res -> ContribRow [u ].Right = iRight ;
939
-
940
937
/* Cut edge points to fit in filter window in case of spill-off */
941
938
if (iRight - iLeft + 1 > windows_size ) {
942
939
if (iLeft < ((int )src_size - 1 / 2 )) {
@@ -946,6 +943,9 @@ static inline LineContribType *_gdContributionsCalc(unsigned int line_size, unsi
946
943
}
947
944
}
948
945
946
+ res -> ContribRow [u ].Left = iLeft ;
947
+ res -> ContribRow [u ].Right = iRight ;
948
+
949
949
for (iSrc = iLeft ; iSrc <= iRight ; iSrc ++ ) {
950
950
dTotalWeight += (res -> ContribRow [u ].Weights [iSrc - iLeft ] = scale_f_d * (* pFilter )(scale_f_d * (dCenter - (double )iSrc )));
951
951
}
@@ -2273,7 +2273,7 @@ int gdTransformAffineGetImage(gdImagePtr *dst,
2273
2273
if (!src -> trueColor ) {
2274
2274
gdImagePaletteToTrueColor (src );
2275
2275
}
2276
-
2276
+
2277
2277
/* Translate to dst origin (0,0) */
2278
2278
gdAffineTranslate (m , - bbox .x , - bbox .y );
2279
2279
gdAffineConcat (m , affine , m );
@@ -2332,7 +2332,7 @@ int gdTransformAffineCopy(gdImagePtr dst,
2332
2332
if (src -> interpolation_id == GD_BILINEAR_FIXED || src -> interpolation_id == GD_BICUBIC_FIXED || src -> interpolation_id == GD_NEAREST_NEIGHBOUR ) {
2333
2333
interpolation_id_bak = src -> interpolation_id ;
2334
2334
interpolation_bak = src -> interpolation ;
2335
-
2335
+
2336
2336
gdImageSetInterpolationMethod (src , GD_BICUBIC );
2337
2337
}
2338
2338
0 commit comments