PyramidImage.CreatePyramids failed to new large bitmap

Developer
Jun 29, 2011 at 5:37 AM

Hi everyone,

There's a problem with loading large GeoTIFF images into a map, when I try to create pyramidimage for geotiff image (32000x32000) ,  dotspatial fail to new large bitmap

 

 

 int w = _header.ImageHeaders[0].NumColumns;  //w = 32000

int h = _header.ImageHeaders[0].NumRows;      //h = 32000
int blockHeight = 32000000 / w;           

if (blockHeight > h) blockHeight = h;           

int numBlocks = (int)Math.Ceiling(h / (double)blockHeight);          

.........................................

                // Read a block of bytes into a bitmap

                byte[] vals = ReadWindow(block * blockHeight, 0, bh, w, 0);
                Bitmap bmp = new Bitmap(w, bh);   // w = 32000 bh = 1000

new Bitmap failed with exception " parameter is not valid"  maybe w is too large for bitmap

 

Does anyone know how to create PyramidImage for large GeoTIFF like that .

Thanks,

dracula_lin