Maxim
Maxim

Reputation: 619

Cropping image to specific ratio

I need to write an algorithm in C# to resize an image to a specific size. For this, I first need to crop the image to target ratio (for example height/width 0.5). I couldnt figure out how to do this yet and most answers that I find are about finding a rectangle that surrounds a specific set of points. Can anyone tell me how to do this?

Upvotes: 0

Views: 17

Answers (0)

Related Questions