/**
/**
 * 处理图片尺寸单位，将 px/rem 转换为纯数字
 * @docgen
 * @function handleImgUnit
 *
 * @param {number|string} size - 输入的尺寸值
 * @return {number} 返回处理后的数值（px）
 *
 * @description
 * 该函数用于处理图片尺寸，去除单位（px/rem）并转换为数字类型。
 * - 纯数字：直接返回
 * - px 单位：去除 'px' 后返回数字
 * - rem 单位：乘以根元素的 fontSize 转换为 px 值
 *
 * @example
 *
 * handleImgUnit(3);        // 3
 * handleImgUnit('10');     // 10
 * handleImgUnit('30px');   // 30
 *
 * // 假设 document.documentElement.style.fontSize = '50px'
 * handleImgUnit('5rem');   // 250
 *
 * // 假设 document.documentElement.style.fontSize = '10px'
 * handleImgUnit('5rem');   // 50
 */
export declare const handleImgUnit: (size: number | string) => string | number | undefined;
/**
 * 将图片地址由 http 替换为 https 协议
 * @param url 图片地址
 * @returns 新的地址
 * @example
 * ```ts
 * // 腾讯系图片域名才会被替换
 * getHttpsUrl('http://game.gtimg.cn/x.jpg');
 * // 'https://game.gtimg.cn/x.jpg'
 *
 * getHttpsUrl('http://wx.qlogo.cn/x.png');
 * // 'https://wx.qlogo.cn/x.png'
 *
 * // 非腾讯域名保持原样
 * getHttpsUrl('http://other.com/x.jpg');
 * // 'http://other.com/x.jpg'
 *
 * // 本身就是 https 不会变
 * getHttpsUrl('https://game.gtimg.cn/x.jpg');
 * // 'https://game.gtimg.cn/x.jpg'
 * ```
 */
export declare const getHttpsUrl: (inUrl: string) => string;
/**
 * 获取 cdn 链接
 * @param {string} url 图片地址
 * @returns 新的地址
 * @example
 * ```ts
 * // cos 域名会被替换为 cdn 加速域名
 * getCdnUrl('https://igame-10037599.cos.ap-shanghai.myqcloud.com/a.jpg');
 * // 'https://igame-10037599.file.myqcloud.com/a.jpg'
 *
 * getCdnUrl('https://gamelife-1251917893.cos.ap-guangzhou.myqcloud.com/b.png');
 * // 'https://gamelife-1251917893.igcdn.cn/b.png'
 *
 * // 非映射表中的域名保持原样
 * getCdnUrl('https://other.com/x.jpg');
 * // 'https://other.com/x.jpg'
 *
 * // 空字符串
 * getCdnUrl(''); // ''
 * ```
 */
export declare function getCdnUrl(inUrl?: string): string;
/**
 * 处理并压缩图片 URL
 * @docgen
 * @function getCompressImgUrl
 *
 * @param {string|object} inUrl - 图片原始 URL，或包含 url/width/height 的对象
 * @param {number} [inImageWidth=0] - 图片裁剪后的宽度（可选，默认为 0，表示不裁剪）
 * @param {number} [inImageHeight=0] - 图片裁剪后的高度（可选，默认为 0，表示不裁剪）
 * @return {string} 返回处理后的图片 URL
 *
 * @description
 * 该函数用于处理腾讯云 COS 图片，实现按需加载和压缩。
 * - 自动将 http 转为 https
 * - 对腾讯云图片添加压缩参数
 * - 自动调整图片尺寸为 2 倍（避免图片模糊）
 * - 宽高按 10 取整（避免图片闪烁）
 *
 * @example
 *
 * // 基础用法
 * const url = 'https://image-xxx.file.myqcloud.com/test.jpg';
 * const compressed = getCompressImgUrl(url, 100, 100);
 *
 * // 使用对象参数
 * const compressed2 = getCompressImgUrl({
 *   url: 'https://image-xxx.file.myqcloud.com/test.jpg',
 *   width: 100,
 *   height: 100
 * });
 */
export declare function getCompressImgUrl(inUrl?: string | {
    width?: number;
    height?: number;
    url?: string;
    replace?: Function;
}, inImageWidth?: number, inImageHeight?: number): string;
/**
 * 处理图片 URL（换 CDN 域名 + 裁剪压缩）
 * @docgen
 * @function tinyImage
 *
 * @param {string} inUrl - 图片原始 URL
 * @param {number} [width=0] - 图片裁剪后的宽度（可选，默认为 0，表示不裁剪）
 * @param {number} [height=0] - 图片裁剪后的高度（可选，默认为 0，表示不裁剪）
 * @return {string} 返回处理后的图片 URL
 *
 * @description
 * 该函数是图片处理的综合方法，依次执行：
 * 1. 将 http 转为 https
 * 2. 替换为 CDN 域名
 * 3. 添加压缩和裁剪参数
 *
 * @example
 *
 * const url = 'http://igame-10037599.cos.ap-shanghai.myqcloud.com/test.jpg';
 * const optimized = tinyImage(url, 200, 200);
 * // 结果：https 域名 + CDN + 压缩参数
 */
export declare const tinyImage: (inUrl: string, imageWidth?: number, imageHeight?: number) => string;
/**
 * 判断当前浏览器是否支持 webp
 * @returns {Promise<boolean> }是否支持
 * @example
 * ```ts
 * const checkWebp = isSupportedWebp();
 * const supported = await checkWebp();
 * if (supported) {
 *   console.log('当前浏览器支持 webp');
 * }
 *
 * // 连续调用会复用上次检测结果（memo 缓存）
 * await checkWebp(); // 不会重复创建 Image
 * ```
 */
export declare const isSupportedWebp: () => () => any;
