Clip an image in a specific shape .NET

后端 未结 2 1333
时光取名叫无心
时光取名叫无心 2021-01-26 01:25

I have a page in my MVC4 project where user can add its company logo using the file upload control. These images/logos are then shown on map in mobile application. We need to cr

2条回答
  •  粉色の甜心
    2021-01-26 02:07

    You can use SetClip function with the Region as parameter:

    https://msdn.microsoft.com/en-us/library/x1zb278e(v=vs.110).aspx

    So you need to create Graphics object from Bitmap, set clip with the shape of your flag and then draw image on that Graphics object. That's all.

提交回复
热议问题