UNPKG

imgtotiny

Version:

一个通用前端图片压缩插件,并可对 PNG 图片进行有损压缩

13 lines (12 loc) 346 B
import { fileToBase64 } from './utils'; export interface Options { quality?: number; minSize?: number; returnBase64?: boolean; allKeepType?: boolean; width?: number; height?: number; } declare function imgToTiny(imgFile: File, options?: Options): Promise<File | string>; export { fileToBase64 }; export default imgToTiny;