eda_pcb_image_tool_process_image
Validates and compresses an image for PCB placement, returning its natural dimensions and a preview data URL for immediate use.
Instructions
pcb_ImageTool.processImage(file: File, options?: { maxBytes?: number; acceptableBytes?: number }) -> Promise<{ file: File; dataURL: string; width: number; height: number; msg: string | null }>
选图处理门面(弹窗内重选图片:校验/压缩/读尺寸/预览 dataURL 全由服务端完成)
deprecated: 临时接口(插入图片 PCB 迁移打通流程用):等统一放置接口重构落地后删除替换,请尽快迁移,勿在新功能中继续依赖
remarks: ADD since EDA v5
returns: 处理结果:file 压缩后文件;dataURL 预览图 dataURL(decode 失败为空字符串);width/height 原始自然尺寸;msg 提示消息(有值需 toast,如「不能超过 50MB」「已压缩至小于2MB」)
[已弃用]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | 按官方签名顺序排列的JSON参数数组 | |
| windowId | No | 目标EDA窗口ID;省略时使用当前活动窗口 |