Skip to content

Commit

Permalink
Fix bilinear resampler
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Dec 28, 2011
1 parent cd03489 commit cb7b812
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/raster/qgsbilinearrasterresampler.cpp
Expand Up @@ -31,7 +31,7 @@ void QgsBilinearRasterResampler::resample( const QImage& srcImage, QImage& dstIm
double nSrcPerDstX = ( double ) srcImage.width() / ( double ) dstImage.width();
double nSrcPerDstY = ( double ) srcImage.height() / ( double ) dstImage.height();

double currentSrcRow = nSrcPerDstX / 2.0 - 0.5;
double currentSrcRow = nSrcPerDstY / 2.0 - 0.5;
double currentSrcCol;

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

currentSrcCol = nSrcPerDstY / 2.0 - 0.5;
currentSrcCol = nSrcPerDstX / 2.0 - 0.5;
for ( int j = 0; j < dstImage.width(); ++j )
{
double u = currentSrcCol - ( int )currentSrcCol;
Expand Down

0 comments on commit cb7b812

Please sign in to comment.