fix: add exotic format decoding to image composition tool

The compose route only decoded HEIC/HEIF via ensureSharpCompat, causing
EPS, PSD, BMP, RAW, and other exotic formats to fail with
"Processing failed". Now uses the same full format pipeline as the
tool-factory for both base and overlay buffers.
This commit is contained in:
SnapOtter
2026-05-12 19:41:23 +08:00
parent d3d50c92be
commit 449f5dc97e
3 changed files with 150 additions and 10 deletions
@@ -65,7 +65,7 @@ export function ComposeSettings() {
id="compose-overlay-image"
ref={overlayInputRef}
type="file"
accept="image/*,.avif,.heic,.heif,.hif"
accept="image/*,.avif,.heic,.heif,.hif,.jxl,.dng,.cr2,.cr3,.nef,.nrw,.arw,.orf,.rw2,.raf,.pef,.3fr,.iiq,.srw,.x3f,.rwl,.gpr,.fff,.mrw,.mef,.kdc,.dcr,.erf,.ptx,.tga,.psd,.exr,.hdr,.svgz,.jp2,.j2k,.qoi,.eps,.dds,.cur,.apng,.dpx,.cin,.fits,.ppm,.pgm,.pbm,.pfm"
onChange={(e) => setOverlayFile(e.target.files?.[0] ?? null)}
className="hidden"
/>