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})
The Tidelift Subscription provides access to a continuously curated stream of human-researched and maintainer-verified data on open source packages and their licenses, releases, vulnerabilities, and development practices.