@@ -931,7 +931,7 @@ static inline void _gdScaleRow(gdImagePtr pSrc, unsigned int src_width, gdImage
931931 int * p_dst_row = dst -> tpixels [row ];
932932 unsigned int x ;
933933
934- for (x = 0 ; x < dst_width - 1 ; x ++ ) {
934+ for (x = 0 ; x < dst_width ; x ++ ) {
935935 register unsigned char r = 0 , g = 0 , b = 0 , a = 0 ;
936936 const int left = contrib -> ContribRow [x ].Left ;
937937 const int right = contrib -> ContribRow [x ].Right ;
@@ -967,7 +967,7 @@ static inline int _gdScaleHoriz(gdImagePtr pSrc, unsigned int src_width, unsigne
967967 return 0 ;
968968 }
969969 /* Scale each row */
970- for (u = 0 ; u < dst_height - 1 ; u ++ ) {
970+ for (u = 0 ; u < dst_height ; u ++ ) {
971971 _gdScaleRow (pSrc , src_width , pDst , dst_width , u , contrib );
972972 }
973973 _gdContributionsFree (contrib );
@@ -977,7 +977,7 @@ static inline int _gdScaleHoriz(gdImagePtr pSrc, unsigned int src_width, unsigne
977977static inline void _gdScaleCol (gdImagePtr pSrc , unsigned int src_width , gdImagePtr pRes , unsigned int dst_width , unsigned int dst_height , unsigned int uCol , LineContribType * contrib )
978978{
979979 unsigned int y ;
980- for (y = 0 ; y < dst_height - 1 ; y ++ ) {
980+ for (y = 0 ; y < dst_height ; y ++ ) {
981981 register unsigned char r = 0 , g = 0 , b = 0 , a = 0 ;
982982 const int iLeft = contrib -> ContribRow [y ].Left ;
983983 const int iRight = contrib -> ContribRow [y ].Right ;
@@ -1014,7 +1014,7 @@ static inline int _gdScaleVert (const gdImagePtr pSrc, const unsigned int src_wi
10141014 return 0 ;
10151015 }
10161016 /* scale each column */
1017- for (u = 0 ; u < dst_width - 1 ; u ++ ) {
1017+ for (u = 0 ; u < dst_width ; u ++ ) {
10181018 _gdScaleCol (pSrc , src_width , pDst , dst_width , dst_height , u , contrib );
10191019 }
10201020 _gdContributionsFree (contrib );
0 commit comments