import { OutputInfo } from "sharp"; declare const IMAGE_FORMAT: { readonly PNG: "png"; readonly JPG: "jpg"; readonly WEBP: "webp"; }; export interface ResizeImageOptions { /** * 出图宽度 * @default 原图宽度 */ width?: number; /** * 出图高度 * @default 原图高度 */ height?: number; /** * 背景色 * @default {r: 0, g: 0, b: 0, alpha: 0} */ background?: string | { r: number; g: number; b: number; alpha: number; }; /** * 适应方式 */ fit?: "contain" | "inside"; /** * 图片链接,本地文件路径or线上cdn链接 */ filePath: string; /** * 本地保存文件夹路径 */ outputDirPath?: string; /** * 本地保存文件名称,不要有后缀名 * @default 输入文件名称 */ outputFileName?: string; /** * 格式,png/jpg * @default 'png' */ extension?: (typeof IMAGE_FORMAT)[keyof typeof IMAGE_FORMAT]; } /** * 修改图片大小 */ export default function resizeImage({ width, height, filePath, fit, outputDirPath, outputFileName, background, extension, }: ResizeImageOptions): Promise; export {};