You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This module can help the image complete compression and support rotation operations at any angle.
Installation
yarn add image-rotation
Usage
letimageRotateimportImageRotationfrom'image-rotation'imageRotate=newImageRotation('your html file data',options)imageRotate.generate('rotate angle',downloadType)//
APIs
new ImageRotation
key
desc
type
defalut
file(required)
input[type=file] data
File or base64
null
options
options
object
{}
options(object)
key
desc
type
defalut
maxLength
The maximum edge size
number
null
quality
compression quality
number
0.92
background
background
string
null
isDrawPngBg
whether to draw background for image/png
boolean
false
importImageRotationfrom'image-rotation'constimageRotate=newImageRotation('your html file data',{maxLength: 2000,quality: 0.8,background: "#fff",isDrawPngBg: true})