开发者

How can I select a part of an image in C#?

开发者 https://www.devze.com 2023-03-18 21:14 出处:网络
Lets say I have a picturebox and I want to crop the image. I know how to crop by rectangles. I开发者_如何学Python want to be able to select a part of the image with mouse and crop it.

Lets say I have a picturebox and I want to crop the image. I know how to crop by rectangles. I开发者_如何学Python want to be able to select a part of the image with mouse and crop it. I think its called Free Form Selecting.


It really is simply tracking one corner of your selection rectangle (usually captured with the MouseDown event) and also the opposing corner for your selection rectangle (usually captured with the MouseUp event). These two coordinate pairs give you the region that the user selected.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号