2

Using FreeImage class from FreeImageNet library, I am loading images of all formats. But it is not releasing handle of file of some large J2K images, that's why images are not loaded.

 FREE_IMAGE_FORMAT frm = FREE_IMAGE_FORMAT.FIF_UNKNOWN;
 FIBITMAP  bitmap = FreeImage.LoadEx(path,FREE_IMAGE_LOAD_FLAGS.DEFAULT, ref frm);
try
{
   using (Bitmap bmp= FreeImage.GetBitmap(bitmap))
   {
       ...............
    }
}
catch()
{
}
finally
{
      FreeImage.UnloadEx(ref bitmap);
}
Shikha
  • 339
  • 2
  • 14

0 Answers0