Changeset 13421

Show
Ignore:
Timestamp:
12/21/07 06:54:29 (7 months ago)
Author:
dron
Message:

Fixed problem with huge resizing ratios in GDALRasterBand::ComputeStatistics?().
Resized image dimensions shouldn't have zero size.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/gdal/gcore/gdalrasterband.cpp

    r13420 r13421  
    29622962            nXReduced = (int)( nRasterXSize / dfReduction ); 
    29632963            nYReduced = (int)( nRasterYSize / dfReduction ); 
     2964 
     2965            // Catch the case of huge resizing ratios here 
     2966            if ( nXReduced == 0 ) 
     2967                nXReduced = 1; 
     2968            if ( nYReduced == 0 ) 
     2969                nYReduced = 1; 
    29642970        } 
    29652971        else