开发者

Cannot read JP2 file with FreeImage .NET wrapper

开发者 https://www.devze.com 2023-01-28 21:31 出处:网络
I\'m trying to read and conve开发者_运维技巧rt JP2 images using the FreeImage accepted answer from this question but getting a 0 byte JOEG file. When I step through I see that the line

I'm trying to read and conve开发者_运维技巧rt JP2 images using the FreeImage accepted answer from this question but getting a 0 byte JOEG file. When I step through I see that the line

FIBITMAP dib = FreeImage.LoadEx(inputImage)

is returning 0 in dib. Is there anything I'm missing.


At the first time you do any thing, add:

if (FreeImage.IsAvailable())
{
    MessageBox.Show("Exits");
}

if this messageBox is showed, that means you were successful in adding this Library into your app. if No, that means if fails. Please check:

  1. If your app is developing base x32, FreeImage.dll and FreeImage.NET.dll must be builded base x32.
  2. the FreeImage.dll and FreeImage.NET.dll must be in same folder with your .exe file. you should add references to FreeImageNet.dll.

I had meet same problem and solved. hope this help.

0

精彩评论

暂无评论...
验证码 换一张
取 消