Is this a Bug ? Image and NumericControl

A

Anand Ganesh

Hi All,

I just have a simple Windows Application with one Windows Form and one
button. In the Button Click event I have the following code.

Bitmap TheImage = new
Bitmap(@"C:\GV7TestService\SIDSpot\mrsiddecode_win\TestImage.png") ;
bool ImageLoaded = true ;

TheImage.Dispose() ;

When I load a 15 MB PNG Image, it works fine.

But when I add one numeric control to the Form and then run the same set of
code, it is throwing "Out of Memory" Exception. This is really absurd! Is
this a known Bug?

Thanks for your time!

Regards

Anand Ganesh
 
B

Bruce Wood

The Bitmap and Image classes will throw an OutOfMemoryException" if the
image file in question is damaged and can't be rendered.

Are you sure that you're reading the same file in both cases?
 
A

Anand Ganesh

Yes I am pretty sure it is the same file and also the 15 MB PNG file is not
corrupted, I can see it in Windows Picture Viewer.

If you have a 15 MB or greater PNG file you can try this out, just a simple
Windows Application will reveal this.

Thanks
Anand Ganesh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top