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:
@@ -16,11 +16,10 @@ const FORMAT_CONTENT_TYPES: Record<string, string> = {
|
||||
gif: "image/gif",
|
||||
heic: "image/heic",
|
||||
heif: "image/heif",
|
||||
jxl: "image/jxl",
|
||||
};
|
||||
|
||||
const settingsSchema = z.object({
|
||||
format: z.enum(["jpg", "png", "webp", "avif", "tiff", "gif", "heic", "heif", "jxl"]),
|
||||
format: z.enum(["jpg", "png", "webp", "avif", "tiff", "gif", "heic", "heif"]),
|
||||
quality: z.number().min(1).max(100).optional(),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user