Skip to content

Commit cb7b812

Browse files
committedDec 28, 2011
Fix bilinear resampler
1 parent cd03489 commit cb7b812

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/core/raster/qgsbilinearrasterresampler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void QgsBilinearRasterResampler::resample( const QImage& srcImage, QImage& dstIm
3131
double nSrcPerDstX = ( double ) srcImage.width() / ( double ) dstImage.width();
3232
double nSrcPerDstY = ( double ) srcImage.height() / ( double ) dstImage.height();
3333

34-
double currentSrcRow = nSrcPerDstX / 2.0 - 0.5;
34+
double currentSrcRow = nSrcPerDstY / 2.0 - 0.5;
3535
double currentSrcCol;
3636

3737
QRgb px1, px2, px3, px4;
@@ -44,7 +44,7 @@ void QgsBilinearRasterResampler::resample( const QImage& srcImage, QImage& dstIm
4444
currentSrcRow += nSrcPerDstY;
4545
}
4646

47-
currentSrcCol = nSrcPerDstY / 2.0 - 0.5;
47+
currentSrcCol = nSrcPerDstX / 2.0 - 0.5;
4848
for ( int j = 0; j < dstImage.width(); ++j )
4949
{
5050
double u = currentSrcCol - ( int )currentSrcCol;

0 commit comments

Comments
 (0)
Please sign in to comment.