ERROR large raster files (.ecw) maybe solved

Feb 14, 2012 at 11:46 AM

I'm new in programming dotspatial.
is really an interesting project.
I tried to load an ecw very heavy. Resulting memory error. But then I tried to change the code "GdalImageSource.cs".
the error comes from the second step of "byte [] vals = new byte [width * height * 4];"
I set the condition
if (vals == null) {
vals = new byte [a + 1];
The game is done.
is that correct?

Feb 14, 2012 at 7:52 PM

Note that images and rasters are currently different objects in DotSpatial.

In both cases the code tries to create arbitrarily large arrays, which doesn't work for large files.

I see the statement you referenced copied to 13 different places, so I expect there is some room for improvement, but I think there will be more work needed...

How does the correct byte array return after your changes?