GDI+ System.Drawing.Bitmap gives error Parameter is not valid intermittently

前端 未结 6 736
抹茶落季
抹茶落季 2021-02-05 16:23

I have some C# code in an ASP.Net application that does this:

Bitmap bmp = new Bitmap(1184, 1900);

And occasionally it throws an exception \"Parameter is not val

6条回答
  •  南旧
    南旧 (楼主)
    2021-02-05 17:09

    Classes within the System.Drawing namespace are not supported for use within a Windows or ASP.NET service

    For a supported alternative, see Windows Imaging Components (msdn), a native library which ironically System.Drawing is based on.

提交回复
热议问题