Re: Exception in creating Bitmap

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Kevin Daly (kevinnospamdaly_at_xtra.co.nz)
Date: 10/13/04


Date: Wed, 13 Oct 2004 21:05:43 +1300

Animation?
(Looks like about a second's worth to me...)

"Peter Foot [MVP]" <feedback@no-spam.inthehand.com> wrote in message
news:eALOpWPsEHA.224@TK2MSFTNGP15.phx.gbl...
> 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
>> ***********************************************************
>
>



Relevant Pages

  • Re: windows Picture & Fax viewer error
    ... > When I double click an attached jpg file in outlook, ... > enough memory to open the file". ... The jpg file is only 2MB. ... also easily be that windows picture & fax viewer has no such problem. ...
    (microsoft.public.windowsxp.general)
  • Re: Can we view a picture from its memory data?
    ... we save all data into a .jpg file and use an Image ... > Is there a way that we can pass those memory .jpg data into Image ... ' Load a picture from a byte array ... ' The function loads the array in a memory stream and then uses the ...
    (microsoft.public.vb.general.discussion)
  • Re: Exception in creating Bitmap
    ... When you create a Bitmap from a jpg file it is uncompressed in memory and ... will require considerably more memory. ... > I have some codes as follows and it always return Exception even if the ... > Bitmap bmp = new Bitmap; ...
    (microsoft.public.dotnet.framework.compactframework)
  • Access violation in TJPEGImage on W2K and XP
    ... I can the file is a JPG file, it is converted into a bitmap. ... the problem is by setting the Bitmap image, ... I must use some memory, which causes problem when the app is being ...
    (comp.lang.pascal.delphi.misc)
  • Exception in creating Bitmap
    ... I have some codes as follows and it always return Exception even if the file ... Could you tell what wrongs about the ... the Pocket PC contains over 11M memory. ...
    (microsoft.public.dotnet.framework.compactframework)