开发者

Cannot read JP2 file with FreeImage .NET wrapper

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜