简体   繁体   中英

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

Lets say I have a picturebox and I want to crop the image. I know how to crop by rectangles. I 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM