Hi Rick, thx for replying, I appreciate that.
Thx for the tip! I've tried it both on .Net and C++ Gdiplus. I suceed on both, I can indeed create images 2Giga pixel or higher (also thx to you I could see how to overcome the famous 2GB arbitrary limit of .Net on array allocation). But now I have another problem... Even if I can generate the big image I can't save it to a file! When using Gdiplus::Status status = BigImage.Save(L"filename.png", &encoder, 0) I have status = Gdiplus::Status::Win32Error. And, when using BigImage.Save(L"filename.png") on .Net I have an unhanded exception of type 'System.Runtime.InteropServices.ExternalException' produced in System.Drawing.dll, and I can notice that it happens while the memory is not taken into RAM. Both failure happens when trying to save image of size 24000 x 60000 or larger, while for images with dimensions up to 24000 x 59000 it works just fine. I can't just figure what Win32Error means in this case (my disk has NTFS format and I have over 100GB of free space), and it surprises me that System.Drawing.Image.Save crashes like this (I tried BMP, PNG, TIFF, JPEG and GIF in both cases, all with the same result). I could not test your 3.5.8 version because I have not enough RAM memory to create a 24000x60000 image and save it (it creates the image, but takes all my 11GB of free space, then it takes a lot of time to save, so I had abort it). Tomorrow I'll try it on a 24GB RAM system.
If you have any suggestions I would be happy to hear.
yes, I've already done this a lot of times as I'm used to allocate over 4GB arrays.
Ouch! Still, your code is pretty neat and elegantly written, I which I could produce such clean and well done code. Fortunately for me I don't need to do such complex things. My problem is that I have lots of data. I don't need to draw such huge images on controls. I actually have lots of 8192x8192 or 16384x16384 tile images (on disk) that I need to put together in a single image of > 1 gigapixels. That's why I need such huge bitmap. I've done it manually with PhotoShop, but it took all my RAM and 600GB of disk space with their temporary files, not to mention the time it took me to do it. Now I'm willing to do it automatically.
thx, leo