feat(images): 插件侧图片策略 v2 —— 全部改走宿主小图(album/promptlib/batch-export/annotate/vectorize/white-bg/cutout)
validate / validate (push) Canceled after 0s
validate / validate (push) Canceled after 0s
This commit is contained in:
1 parent
70613a4112
commit
9ceaa7d699
15 files changed
+53
-24
No files matched your search
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@iwb-plugin/image-vectorize",
|
||||
"private": true,
|
||||
"version": "0.6.1",
|
||||
"version": "0.6.2",
|
||||
"description": "位图转矢量:potrace(纯 JS)单色/灰度描摹,输出 SVG 与 PNG 节点;对文字、logo、线稿保形好,不需要 wasm",
|
||||
"ibwPlugin": {
|
||||
"id": "image-vectorize",
|
||||
|
||||
@@ -3691,7 +3691,7 @@ var __IWB_VECTORIZE_MANIFEST__ = {
|
||||
});
|
||||
}
|
||||
async function resolveImage(nodeId) {
|
||||
const image = await ctx.canvas.getNodeImage(nodeId);
|
||||
const image = await ctx.canvas.getNodeImage(nodeId, { max: 2048 }); // v: 预览/矢量化封顶 2048
|
||||
if (!image) throw new Error("该节点没有可描摹的图片");
|
||||
if (image.dataUrl) return image.dataUrl;
|
||||
if (!image.url) throw new Error("该节点没有可描摹的图片");
|
||||
|
||||
Reference in new issue
Block a user