feat: add JXL to all tool format selectors, expand convert with BMP/ICO/JP2/QOI, add server-side editor export

This commit is contained in:
SnapOtter
2026-05-08 00:19:19 +08:00
parent 390b5adb8c
commit 80961c0187
28 changed files with 282 additions and 65 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ import { COLLAGE_TEMPLATES, getDefaultTemplate } from "@/lib/collage-templates";
import { fetchDecodedPreview, needsServerPreview, revokePreviewUrl } from "@/lib/image-preview";
export type AspectRatio = "free" | "1:1" | "4:3" | "3:2" | "16:9" | "9:16" | "4:5";
export type OutputFormat = "png" | "jpeg" | "webp" | "avif";
export type OutputFormat = "png" | "jpeg" | "webp" | "avif" | "jxl";
export type Phase = "upload" | "editing" | "processing" | "result";
export interface CollageImage {
+2 -2
View File
@@ -18,7 +18,7 @@ interface SplitState {
rows: number;
tileWidth: number;
tileHeight: number;
outputFormat: "original" | "png" | "jpg" | "webp" | "avif";
outputFormat: "original" | "png" | "jpg" | "webp" | "avif" | "jxl";
quality: number;
// Image dimensions (set when image loads in the canvas)
@@ -36,7 +36,7 @@ interface SplitState {
setRows: (n: number) => void;
setTileWidth: (n: number) => void;
setTileHeight: (n: number) => void;
setOutputFormat: (f: "original" | "png" | "jpg" | "webp" | "avif") => void;
setOutputFormat: (f: "original" | "png" | "jpg" | "webp" | "avif" | "jxl") => void;
setQuality: (q: number) => void;
setImageDimensions: (d: { width: number; height: number } | null) => void;
setProcessing: (p: boolean) => void;