简体   繁体   中英

diplaying jp2 in a picturebox in C# / .NET 2.0 on CE5 using FreeImage

I'm trying to display a jp2 image in a picturebox on a CE5 device using FreeImage .

Everything works fine on the win32 side where I do initial code testing, but I get a compile error when compiling for CE5.

This line:

Bitmap bmFacial = (Bitmap)fib;

Where fib is a FreeImageBitmap produces this error:

error CS0030: Cannot convert type 'FreeImageAPI.FreeImageBitmap' to 'System.Drawing.Bitmap'

I suppose I could save the image to a .jpg file, then open it and apply it to the picturebox, but that seems a bit clunky.

Any idea?

A quick read of the FreeImage source shows me there is a desktopx86 and x64 configuration, but nothing for CE. That leads me to believe that it's not set up to build a Windows CE binary. Windows CE cannot use desktop binaries (native or .NET), so you would have to create a CE project, build FreeImage specifically for CE, build the .NET wrapper for the Compact Framework and then you could use it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM