Maximum size for a bitmap?

  • Thread starter Thread starter Claire Greenfield
  • Start date Start date
C

Claire Greenfield

I have a vb dotnet program which uses bitmaps. The following line of
code works fine for most situations:

aBitmap = New Bitmap((100 / mZoom) * mBitmap.Width, (100 / mZoom) *
mBitmap.Height, Drawing.Imaging.PixelFormat.Format32bppArgb)

However, if the width and height values are 5376 and 46080
respectively, I get a 'invalid parameter used' error. Is there a limit
on the size of a bitmap??
Any ideas appreciated.
Claire
 
OK, so if I use this code, why do I still get the 'invalid parameter
used' error:

Const iWidth As Integer = 10000
Const iHeight As Integer = 20000
Dim aBitmap As New Drawing.Bitmap(iWidth, iHeight,
Drawing.Imaging.PixelFormat.Format32bppArgb)

Thanks for your help.
Claire
 
Back
Top