@@ -4584,7 +4584,7 @@ bool QgsRasterImageBuffer::createNextPartImage()
4584
4584
if ( mMapToPixel )
4585
4585
{
4586
4586
imageX = mViewPort ->topLeftPoint .x ();
4587
- imageY = mViewPort ->topLeftPoint .y () + mCurrentPartRasterMin / mMapToPixel -> mapUnitsPerPixel () ;
4587
+ imageY = mViewPort ->topLeftPoint .y () + mCurrentPartRasterMin ;
4588
4588
}
4589
4589
4590
4590
QgsDebugMsg ( QString ( " mCurrentPartRasterMin = %1" ).arg ( mCurrentPartRasterMin ) );
@@ -4654,18 +4654,18 @@ bool QgsRasterImageBuffer::createNextPartImage()
4654
4654
{
4655
4655
return false ;
4656
4656
}
4657
- mNumCurrentImageRows = ySize ;
4658
- QgsDebugMsg ( " alloc " + QString::number ( size * xSize * ySize ) );
4659
- mCurrentGDALData = VSIMalloc ( size * xSize * ySize );
4657
+ mNumCurrentImageRows = rasterYSize ;
4658
+ QgsDebugMsg ( " alloc " + QString::number ( size * xSize * rasterYSize ) );
4659
+ mCurrentGDALData = VSIMalloc ( size * xSize * rasterYSize );
4660
4660
4661
4661
double yMax = mViewPort ->mDrawnExtent .yMaximum () - mCurrentRow * mMapToPixel ->mapUnitsPerPixel ();
4662
- double yMin = yMax - ySize * mMapToPixel ->mapUnitsPerPixel ();
4662
+ double yMin = yMax - rasterYSize * mMapToPixel ->mapUnitsPerPixel ();
4663
4663
4664
4664
QgsDebugMsg ( QString ( " mCurrentRow = %1 yMaximum = %2 ySize = %3 mapUnitsPerPixel = %4" ).arg ( mCurrentRow ).arg ( mViewPort ->mDrawnExtent .yMaximum () ).arg ( ySize ).arg ( mMapToPixel ->mapUnitsPerPixel () ) );
4665
4665
QgsRectangle myPartExtent ( mViewPort ->mDrawnExtent .xMinimum (), yMin,
4666
4666
mViewPort ->mDrawnExtent .xMaximum (), yMax );
4667
4667
QgsDebugMsg ( " myPartExtent is " + myPartExtent.toString () );
4668
- mDataProvider ->readBlock ( mBandNo , myPartExtent, xSize, ySize , mViewPort ->mSrcCRS , mViewPort ->mDestCRS , mCurrentGDALData );
4668
+ mDataProvider ->readBlock ( mBandNo , myPartExtent, xSize, rasterYSize , mViewPort ->mSrcCRS , mViewPort ->mDestCRS , mCurrentGDALData );
4669
4669
4670
4670
// create the QImage
4671
4671
if ( mWritingEnabled )
0 commit comments