sharp
sharp copied to clipboard
Set point of rotation. Transform-origin css
It will be great to implement https://developer.mozilla.org/en-US/docs/Web/CSS/transform-origin
This should be possible via the idx
, idy
, odx
, and ody
parameters of the internal call to vips_rotate.
These would need exposing in sharp's rotate operation.
It shoud works like .rotate(35, {background: '#f2dcd8', idx:100,idy:50,odx:40,ody:50 })
?
This would be very useful. The current rotate behavior results in a reference point that is hard to use for subsequent crop operations (e.g. generating a round user avatar image that gets rotated by an angle that is not a multiple of 90°).