Click here to Skip to main content
15,885,979 members
Home / Discussions / Mobile
   

Mobile

 
QuestionUnable to load bitmap with Compact Framework Pin
rudy.net2-Mar-09 8:42
rudy.net2-Mar-09 8:42 
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()
AnswerRe: Unable to load bitmap with Compact Framework Pin
Joel Ivory Johnson5-Mar-09 7:50
professionalJoel Ivory Johnson5-Mar-09 7:50 
GeneralRe: Unable to load bitmap with Compact Framework Pin
rudy.net5-Mar-09 8:15
rudy.net5-Mar-09 8:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.