Gdal Bug? was: Re: [gdal-dev] JP2MRSID Issues

Michael P. Gerlek mpg at lizardtech.com
Fri Nov 14 14:43:44 EST 2008


> int sceneWidth  = (int)(nXSize * maxWidth / (double)maxWidthAtL0 + 0.99);
> int sceneHeight = (int)(nYSize * maxHeight / (double)maxHeightAtL0 + 0.99);

Ouch, you shouldn't be doing rounding like that.  Use the getDimsAtMag() function to get the exact width/height you need and all will be well.

-mpg



More information about the gdal-dev mailing list