(C#) graphics.drawImage has a size limit? How to deal with it?
Posted
by DGH
on Stack Overflow
See other posts from Stack Overflow
or by DGH
Published on 2010-04-07T22:53:20Z
Indexed on
2010/04/07
23:23 UTC
Read the original article
Hit count: 337
I am attempting to display a very large graphical representation of some data. I am using a bitmap for persistent storage of the image and e.Graphics.DrawImage(myBitmap, new Point(0,0))
in the onPaint of a PictureBox control on my form. I have noticed (and heard mentioned on other sites) that if my image has a height or width greater than 2^15, I get a Parameter not Valid
exception, but I have not found any official documentation of this limit.
Is this 2^15 image size limit a definite, official part of Graphics.DrawImage
? Are there any simple workarounds to render my entire image onto the form?
(Yes, the pictureBox is set to the same size as the image, or bigger. Side question though, should I just be using the onPaint of the form itself instead of a picture box?)
© Stack Overflow or respective owner