1.0.0-beta.2 • Published 4 years ago
file2canvas v1.0.0-beta.2
file2canvas
Image compression, correct image rotation angle.
Installing
$ npm install file2canvas
Usage
import file2canvas from "file2canvas";
file2canvas(file, options)
.then((canvas) => {
// code
})
.catch((errorType) => {
// code
});
Params
file
input choose file
options
Param | Type | Default | require | Description |
---|---|---|---|---|
maxSize | Number | 0 | false | file maxSize |
width | Number | -- | false | output canvas width |
background | String | transparent | false | canvas background |
ErrorType
code | des |
---|---|
100 | File does not exist or format is wrong |
101 | The file size exceeds the specified size |
1.0.0-beta.2
4 years ago
1.0.0-beta.3
4 years ago
1.0.0-alpha11
4 years ago
1.0.0-alpha10
4 years ago
1.0.0-beta.1
4 years ago
1.0.0-alpha9
4 years ago