yaic (just another image clipper)
Takes a (css transformed) image and clips it to to a given area.
npm install yaicbower install yaic
<!-- for jQuery support see this one -->
the yaic function takes 2 Parameter:
- area: object with the following properties
- width: width of the clipping area
- height: height of the clipping area
- targetWidth: width of resulting image
- targetHeight: height of resulting image
- x: translation of clipping area
- y: translation of clipping area
targetHeight can be dropped. yaic then calculates the clipping area without scaling the orginal image at all which means you get the best possible quality.
Make sure, the ratio of
width/height equals the ratio of
yaic does not support skew!