fix(inkscape): use headless-safe export syntax (--export-type/--export-filename)

Breaking change from Inkscape 1.0+:
- Old syntax: inkscape input.png -o output.svg (triggers GTK init)
- New syntax: inkscape input.png --export-type=svg --export-filename=output.svg

This is the correct headless-safe approach, no need for xvfb.

Ref: https://inkscape.org/doc/inkscape-man.html
This commit is contained in:
Your Name 2026-01-23 00:01:24 +08:00
parent b5992a84e0
commit 26304a295e
3 changed files with 52 additions and 80 deletions

View file

@ -167,14 +167,13 @@ RUN apt-get update --fix-missing && apt-get install -y --no-install-recommends \
# 階段 4圖像處理工具
# 注意bookworm 使用 imagemagick版本 6trixie 才有 imagemagick-7
# 注意:xvfb 用於 Inkscape 在 headless 環境運行(需要虛擬 X11 顯示器)
# 注意:Inkscape 1.0+ 使用 --export-type/--export-filename 語法,支援 headless 執行,不需要 xvfb
RUN apt-get update --fix-missing && apt-get install -y --no-install-recommends \
imagemagick \
inkscape \
libheif-examples \
libjxl-tools \
libvips-tools \
xvfb \
&& rm -rf /var/lib/apt/lists/*
# 階段 5文件處理工具