Why not use GDI+ from ASP.NET

前端 未结 2 1795
耶瑟儿~
耶瑟儿~ 2020-12-11 07:52

I\'ve been told that using GDI+ from ASP.NET is dangerous and undefined.

Is that because there is no guarantee of a Device Context? Can someone explain?

Wha

2条回答
  •  醉酒成梦
    2020-12-11 08:41

    There are scalability concerns around the creation of windows handles and resources that GDI+ uses in a web environment.

    Placed ASP.NET GDI+ code in a singleton so that calls are serialised and dispose of objects correctly.

    I have used this technique for dynamically created images without a hitch.

提交回复
热议问题