export { genFileId } from 'element-plus';
export interface FileConversionOptions {
    mimeType?: string;
}
/**
 * 将 URL 转换为 Blob
 * @param url
 * @returns
 */
export declare function urlToBlob(url: string): Promise<Blob>;
/**
 * 将 URL 转换为 File
 * @param url
 * @param filename
 * @param options
 * @returns
 */
export declare function urlToFile(url: string, filename: string, options?: FileConversionOptions): Promise<File>;
/**
 * 将 Base64 字符串转换为 File
 * @param base64
 * @param filename
 * @param options
 * @returns
 */
export declare function base64ToFile(base64: string, filename: string, options?: FileConversionOptions): File;
/**
 * 将 File 转换为 Base64 字符串
 * @param file
 * @returns
 */
export declare function fileToBase64(file: File): Promise<string>;
/**
 * 将 Blob 转换为 Base64 字符串
 * @param blob
 * @returns
 */
export declare function blobToBase64(blob: Blob): Promise<string>;
/**
 * 将 File 转换为 Blob
 * @param file
 * @param options
 * @returns
 */
export declare function fileToBlob(file: File, options?: FileConversionOptions): Blob;
/**
 * 将 Blob 转换为 File
 * @param blob
 * @param filename
 * @param options
 * @returns
 */
export declare function blobToFile(blob: Blob, filename: string, options?: FileConversionOptions): File;
/**
 * 将 Base64 字符串转换为 Blob
 * @param base64
 * @param options
 * @returns
 */
export declare function base64ToBlob(base64: string, options?: FileConversionOptions): Blob;
/**
 * canvas转Blob
 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLCanvasElement/toBlob)
 */
export declare const canvasToBlob: (canvas: HTMLCanvasElement, type?: string, quality?: any) => Promise<Blob>;
/**
 * 文件转本地url
 * @param file
 * @returns
 */
export declare function fileToUrl(file: File | Blob): string;
export declare function fileValidType(file: File, validTypes: string): boolean;
/**
 * 计算文件的MD5哈希值
 * @param file 要计算哈希值的文件
 * @returns 文件的MD5哈希值
 */
export declare const fileMd5: (file: File) => Promise<string>;
/**
 * 获取图片宽高信息
 * @param source 图片文件或图片链接
 * @returns 图片宽高信息
 */
export declare function getImageInfo(source: File, options?: {
    hideMessage?: boolean;
}): Promise<HTMLImageElement>;
export declare function getImageInfo(source: string, options?: {
    hideMessage?: boolean;
}): Promise<HTMLImageElement>;
/**
 * 获取视频信息
 * @param url 视频链接
 * @returns 视频宽高信息
 */
export declare const getVideoInfo: (url: string) => Promise<{
    width: number;
    height: number;
    duration: number;
}>;
