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:
- If your app is developing base x32, FreeImage.dll and FreeImage.NET.dll must be builded base x32.
- 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.
精彩评论