-
-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathindex.d.ts
45 lines (40 loc) · 1.14 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
declare module "react-image-file-resizer" {
class Resizer {
static changeHeightWidth(
height: number,
maxHeight: number,
width: number,
maxWidth: number,
minWidth: number,
minHeight: number
): { height: number; width: number };
static resizeAndRotateImage(
image: HTMLImageElement,
maxWidth: number,
maxHeight: number,
minWidth: number,
minHeight: number,
compressFormat?: string,
quality?: number,
rotation?: number
): string;
static b64toBlob(b64Data: string, contentType: string): Blob;
static b64toFile(b64Data: string, fileName: string, contentType: string): File;
static createResizedImage(
file: Blob,
maxWidth: number,
maxHeight: number,
compressFormat: string,
quality: number,
rotation: number,
responseUriFunc: (
value: string | Blob | File | ProgressEvent<FileReader>
) => void,
outputType?: string,
minWidth?: number,
minHeight?: number
): void;
}
const FileResizer: { imageFileResizer: typeof Resizer.createResizedImage };
export default FileResizer;
}