Rasterise a rotated / flipped / cropped copy of an image.
Unlike a CSS transform this produces new bytes, so the result survives
export, copy-paste and any consumer that only reads src, which is the
whole point of editing in the document rather than in the stylesheet.
Throws where there is no canvas: silently returning the original would hand
the caller an unrotated image and no way to notice.
Rasterise a rotated / flipped / cropped copy of an image.
Unlike a CSS transform this produces new bytes, so the result survives export, copy-paste and any consumer that only reads
src, which is the whole point of editing in the document rather than in the stylesheet.Throws where there is no canvas: silently returning the original would hand the caller an unrotated image and no way to notice.