0

I am trying to initiate a new Image object here:

Bitmap image = new Bitmap(21241,21241);

The overloaded constructor that i intend to use is this one:

public Bitmap(
    int width,
    int height
)

I do understand that the value 21241 is a bit but still under the int range than why it says invalid parameter?

Already check this answers:

Community
  • 1
  • 1
Maven
  • 14,587
  • 42
  • 113
  • 174
  • You are probably running the process out of memory with that. – Oded Nov 23 '13 at 20:21
  • Checkt this out - http://social.msdn.microsoft.com/Forums/vstudio/en-US/37684999-62c7-4c41-8167-745a2b486583/systemdrawingbitmap-max-size?forum=netfxbcl . Most probably memory issue. In theory you should be able to set both values up to `Int32.Max` but in practice this seems to cause problems. – Leron Nov 23 '13 at 20:37

0 Answers0