سؤال

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top