问题
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.
回答1:
AForge is meant to be very good!
来源:https://stackoverflow.com/questions/538746/what-libraries-are-available-for-manipulating-super-large-images-in-net