mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix: ICO needs CLI decode, AVIF compress missing options, remove JXL output
- ICO: Sharp cannot decode ICO files. Added ImageMagick-based ICO decoder that extracts the largest embedded image. Added ICO to CLI_DECODED_FORMATS and SERVER_PREVIEW_EXTENSIONS. Removed from BROWSER_PREVIEWABLE sets. - AVIF compress: Sharp's AVIF encoder requires effort option. Added formatOpts() helper that supplies effort:4 for AVIF format. - JXL output: Docker's bundled libvips lacks the JXL encoder plugin. Removed JXL as a convert output target to avoid guaranteed failures. JXL remains fully supported as an input format.
This commit is contained in:
@@ -4,8 +4,8 @@ import { ProgressCard } from "@/components/common/progress-card";
|
||||
import { useToolProcessor } from "@/hooks/use-tool-processor";
|
||||
import { useFileStore } from "@/stores/file-store";
|
||||
|
||||
const OUTPUT_FORMATS = ["jpg", "png", "webp", "avif", "tiff", "gif", "heic", "heif", "jxl"] as const;
|
||||
const LOSSY_FORMATS = ["jpg", "jpeg", "webp", "avif", "heic", "heif", "jxl"];
|
||||
const OUTPUT_FORMATS = ["jpg", "png", "webp", "avif", "tiff", "gif", "heic", "heif"] as const;
|
||||
const LOSSY_FORMATS = ["jpg", "jpeg", "webp", "avif", "heic", "heif"];
|
||||
|
||||
export interface ConvertControlsProps {
|
||||
settings?: Record<string, unknown>;
|
||||
|
||||
@@ -3,6 +3,7 @@ import { formatHeaders } from "@/lib/api";
|
||||
const SERVER_PREVIEW_EXTENSIONS = new Set([
|
||||
"heic", "heif", "hif", // HEIF
|
||||
"jxl", // JPEG XL (Chrome dropped support)
|
||||
"ico", // ICO (Sharp can't decode)
|
||||
"dng", "cr2", "nef", "arw", "orf", "rw2", // Camera RAW
|
||||
"tga", // Targa
|
||||
"psd", // Photoshop
|
||||
|
||||
@@ -45,7 +45,6 @@ const BROWSER_PREVIEWABLE_EXTS = new Set([
|
||||
"webp",
|
||||
"svg",
|
||||
"bmp",
|
||||
"ico",
|
||||
"avif",
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user