|
Hi,
I am using CF3.5 on Windows CE5.0 and when I try to create a bitmap using:
Bitmp bmp = new Bitmap(filepath)
I get the exception error below. I also tried loading file into MemoryStreamm and then tried creating bitmap by passing a memory stream with all bytes corresponding to image but I get same error.
I tried loading bmp, jpg, png images but none work. The device I am using is an iPAQ310. Is it possible that it's missing some kind of codec or some driver that compact framework assumes it to be there? If so, what is it missing?
Thanks in advance for any help you can provide.
System.Exception was unhandled
Message="Exception"
StackTrace:
at Microsoft.AGL.Common.MISC.HandleAr(PAL_ERROR ar)
at System.Drawing.Bitmap._InitFromMemoryStream(MemoryStream mstream)
at System.Drawing.Bitmap..ctor(String filename)
at SkyVision.LocalFileImages.Resources.get_tiny()
at SkyVision.FrontViewPanel..ctor()
at SkyVision.MainForm.InitializeComponent()
at SkyVision.MainForm..ctor()
at SkyVision.Program.Main()
|
|
|
|
|
You may want to install onto your device the resource DLL that contains the detailed error messages.
What is the resolution of the image?
|
|
|
|
|
Hi Joel, I already tried embedding a simple bmp 5x5 pixels into my exe and still got same problem. I have been digging into it and the problem seems to be that the device I am programming into (HP iPAQ 310) does not have the necessary dll's required by framework. The framework uses gdiplus.dll. Then I believe gdiplus.dll uses gdi32.dll and this dll itself uses coredll.dll.
The only one available in this device is coredll.dll and since it's in ROM, I am not able to even place another dll in the windows location. I would have to contact HP to have them provide me a new ROM version that contains this functionality.
However, this device has some neat 3D games so the alternative would be to figure out what library those games use. Problem is that I will have to go back to C++ for that.
|
|
|
|