image-js / image-js-typescript

Temporary repository to work on the migration of image-js to TypeScript
https://image-js.github.io/image-js-typescript/
MIT License
5 stars 5 forks source link

Add `cropRectangle` function #436

Closed targos closed 4 months ago

targos commented 5 months ago

Takes an array of 4 points, validates, and extracts the closest possible rectangle from it (Math.ceil for width, height), rotating around the axis with the smallest angle.