4

I have some really large files for example 320 MB tif file with 14000 X 9000 pixels.

The operations I need to perform are basically scaling the images to get smaller versions of it and breaking the image into tiles.

My code works fine with small files and I use the .Net Bitmap objects but I will occasionally get Out of Memory exceptions for larger files.

I've tried using the FreeImage libraries FreeImageBitmap but have the same problems.

I'm using something like the following to scale the image:

using (Graphics g = Graphics.FromImage((Image)result))
{
   g.DrawImage(
      source,
      xOffset, yOffset,
      source.Width * scale, source.Height * scale
   );
}

Ideally I'd like a third party library to do all the hardwork, but if you have any tips or resources with more information I would appreciate it.

4

1 回答 1

3

AForge is meant to be very good!

于 2009-02-11T21:06:55.103 回答