zpl-image-modern
Version:
Modern ZPL image conversion library supporting both browser and Node.js environments
27 lines • 1.19 kB
TypeScript
import { type ZplImageOptions, type ZplImageResult } from "./core";
/**
* [浏览器专用] 将 HTMLImageElement 转换为 Z64 压缩格式的 ZPL。
* @param img - HTMLImageElement 元素
* @param opts - 配置选项
* @returns 包含 ZPL 数据的对象
*/
export declare function imageToZ64(img: HTMLImageElement, opts?: ZplImageOptions): ZplImageResult;
/**
* [浏览器专用] 将 HTMLImageElement 转换为 ACS 压缩格式的 ZPL。
* @param img - HTMLImageElement 元素
* @param opts - 配置选项
* @returns 包含 ZPL 数据的对象
*/
export declare function imageToACS(img: HTMLImageElement, opts?: ZplImageOptions): ZplImageResult;
/**
* 将 RGBA 像素数据转换为 Z64 压缩格式的 ZPL。
* 浏览器环境使用 pako 进行压缩。
* @param rgba - Uint8ClampedArray (来自 Canvas)
* @param width - 图像宽度
* @param opts - 配置选项
* @returns 包含 ZPL 数据的对象
*/
export declare function rgbaToZ64(rgba: Uint8ClampedArray, width: number, opts?: ZplImageOptions): ZplImageResult;
export type { ZplRotation, ZplImageOptions, ZplImageResult } from "./core";
export { rgbaToACS } from "./core";
//# sourceMappingURL=browser.d.ts.map