PC Review


Reply
Thread Tools Rate Thread

Bitmap Constructor throwing an exception

 
 
=?Utf-8?B?QnJlbnQgTGFuZw==?=
Guest
Posts: n/a
 
      5th Mar 2004
I am trying to load a bitmap from an embedded resource (or from the disk, I get the same problem).
When I try to create a new Bitmap with either of the following lines

b = new Bitmap(fullFileName); //fullFileName looks like \Program Files\Windows\MyProgram\Image.gif, and the file definitely exists

or

b = new Bitmap(Assembly.GetExecutingAssembly().GetManifestResourceStream(ImageToLoad)); //where ImageToLoad looks like "MyAssemblyName.Image.gif" and It is an embedded resource.

I have this same exact code working on a PocketPC 2002 Project without a problem. I am now trying to get it to work on a project running on WinCE .NET 4.2 on a device called a "MidasPAD". I have the Midas SDK installed that came with the device.

When it hits the new Bitmap line, I get an exception being thrown. The exception is of type "Exception", and the Message Property's value is "Exception".

If there was a meaningful message, maybe I would be able to come to some sort of conclusion, but to no avail.

Anyone have any ideas?
 
Reply With Quote
 
 
 
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      5th Mar 2004
Does the CE 4.2 image have imgdecmp.dll? I suspect it doesn't.

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


"Brent Lang" <(E-Mail Removed)> wrote in message
news:5EA1BB01-10A9-476D-A09B-(E-Mail Removed)...
> I am trying to load a bitmap from an embedded resource (or from the disk,

I get the same problem).
> When I try to create a new Bitmap with either of the following lines
>
> b = new Bitmap(fullFileName); //fullFileName looks like \Program

Files\Windows\MyProgram\Image.gif, and the file definitely exists
>
> or
>
> b = new

Bitmap(Assembly.GetExecutingAssembly().GetManifestResourceStream(ImageToLoad
)); //where ImageToLoad looks like "MyAssemblyName.Image.gif" and It is an
embedded resource.
>
> I have this same exact code working on a PocketPC 2002 Project without a

problem. I am now trying to get it to work on a project running on WinCE
..NET 4.2 on a device called a "MidasPAD". I have the Midas SDK installed
that came with the device.
>
> When it hits the new Bitmap line, I get an exception being thrown. The

exception is of type "Exception", and the Message Property's value is
"Exception".
>
> If there was a meaningful message, maybe I would be able to come to some

sort of conclusion, but to no avail.
>
> Anyone have any ideas?



 
Reply With Quote
 
=?Utf-8?B?QnJlbnQgTGFuZw==?=
Guest
Posts: n/a
 
      5th Mar 2004
Thank you for your quick response. I looked for the file imgdecmp.dll and I do not see it on the device. I read that this must be included as part of the OS Image, is this true?. Since I do not have it currently installed, how can I get that file onto the device, so that I can load images?
 
Reply With Quote
 
Alex Yakhnin [MVP]
Guest
Posts: n/a
 
      5th Mar 2004
http://msdn.microsoft.com/mobility/p.../FAQ/default.a
spx#1.31

--
Alex Yakhnin .NET CF MVP
www.intelliprog.com | www.opennetcf.org

"Brent Lang" <(E-Mail Removed)> wrote in message
news:373F4732-D387-4F7D-B682-(E-Mail Removed)...
> Thank you for your quick response. I looked for the file imgdecmp.dll and

I do not see it on the device. I read that this must be included as part of
the OS Image, is this true?. Since I do not have it currently installed,
how can I get that file onto the device, so that I can load images?


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
unsafe c# call with bitmap pointer throwing exception bcutting@gmail.com Microsoft C# .NET 0 10th Aug 2006 02:26 AM
throwing exception from constructor Sek Microsoft C# .NET 40 4th Aug 2006 04:05 PM
How can I verify if imgdecmp.dll is included in my system? Exception in Bitmap constructor Alexander Microsoft Dot NET Compact Framework 1 24th Jun 2004 01:59 AM
Bitmap constructor throwing System.Exception Microsoft Dot NET Compact Framework 6 22nd Jun 2004 07:18 AM
exception in bitmap(stream*) constructor Soja Microsoft VC .NET 0 19th Aug 2003 12:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:14 AM.