I've recently upgraded one of our scanning applications from GDPicture8 to GDPicture11. When testing it's performance I've noticed extremely high memory consumption when converting color images to thumbnails. We're scanning in 200 DPI. Our code has not changed in any way, we just changed reference to GdPicture dll and fixed namespaces. This is the code we're using to generate thumbnails.
Code: Select all
int tiffID = gdImaging.CreateGdPictureImageFromFile(path);
if (tiffID == 0)
{
return null;
}
int ThumbnailID = gdImaging.CreateThumbnailHQ(tiffID, thumbWi, thumbHi, Ozadje);
Bitmap thumb = null;
if (ThumbnailID != 0)
{
thumb = new Bitmap(gdImaging.GetBitmapFromGdPictureImage(ThumbnailID));
//thumb.Save(@"c:\test\test.bmp");
gdImaging.ReleaseGdPictureImage(ThumbnailID);
}
gdImaging.ReleaseGdPictureImage(tiffID);
return thumb;