Bitmap limitations?

D

Drasko

I am using Bitmap class to read picture from file (Bitmap b = new
Bitmap("test.jpg")). When it loads, image is streched. Original picture size
is downsized from 21400x200 pixels to 9844x92 pixels (it is bitmap strip for
OpenNETCF.AnimateCtrl). Are there any limitations?

(I tried to use BitmapEx to se if any difference exists, but
System.MissingMethodException occurs? Why?)
 
A

Alex Feinman [MVP]

If you are attempting to create an instance of a bitmap (does not matter
streched, or not) that is 21400x200, that would cause it to be 8,560,000
bytes in memory (H x W x 16bpp). This is too much. I expect you would be
getting OutOfMemoryException
 
D

Drasko

Yes, if it behived like that, than I would know that this is memory
limitation! But there is no exception and whole bitmap is loaded, but with
different size!? It seems like it strech it to fit in certain memory space?
 

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