Re: Exception in creating Bitmap
From: Peter Foot [MVP] (feedback_at_no-spam.inthehand.com)
Date: 10/13/04
- Next message: Rolf Kragh: "Re: TypeLoadException"
- Previous message: Peter Foot [MVP]: "Re: shell"
- In reply to: developer4now: "Exception in creating Bitmap"
- Next in thread: Kevin Daly: "Re: Exception in creating Bitmap"
- Reply: Kevin Daly: "Re: Exception in creating Bitmap"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 13 Oct 2004 08:24:24 +0100
When you create a Bitmap from a jpg file it is uncompressed in memory and
will require considerably more memory. Any particular reason why you want a
240 x 11000 pixel image? you are not going to be able to display the entire
image on screen at once.
Peter
-- Peter Foot Windows Embedded MVP www.inthehand.com | www.opennetcf.org Do have an opinion on the effectiveness of Microsoft Windows Mobile and Embedded newsgroups? Let us know! https://www.windowsembeddedeval.com/community/newsgroups "developer4now" <developer4now@discussions.microsoft.com> wrote in message news:B9EB3395-002E-4CCD-A521-62E32BC084AB@microsoft.com... > Dear all, > I have some codes as follows and it always return Exception even if the > file > exists. I don't where is the error. Could you tell what wrongs about the > codes. > Also, how large of Image can be created in .Net Compact Framework. When I > have try to create a Image in 240 * 11000, it returns Out of Memory > Exception. However, the Pocket PC contains over 11M memory. How can I do? > Thanks. > > *********************************************************** > string imagePath = "001.jpg"; > try > { > if ( System.IO.File.Exists(imagePath) ) > { > Bitmap bmp = new Bitmap(imagePath); > } > } > catch(Exception ex) > { > MessageBox.Show(ex.Message); > } > > Result: > Exception > ***********************************************************
- Next message: Rolf Kragh: "Re: TypeLoadException"
- Previous message: Peter Foot [MVP]: "Re: shell"
- In reply to: developer4now: "Exception in creating Bitmap"
- Next in thread: Kevin Daly: "Re: Exception in creating Bitmap"
- Reply: Kevin Daly: "Re: Exception in creating Bitmap"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|