Skip to content

armgit / VERT

Public Imported from GitHub
0

The next-generation file converter. Open source, fully local* and free forever.

fix: remove dynamic libraries, again

JovannMCae6f56ec3eb4
diff --git a/src/lib/converters/vips/formats.ts b/src/lib/converters/vips/formats.ts
index afb9707..0bdaece 100644
--- a/src/lib/converters/vips/formats.ts
+++ b/src/lib/converters/vips/formats.ts
@@ -15,16 +15,8 @@ export const vipsFormats: FormatInfo[] = applyPriorities("libvips", [
f("gif"),
f("tif"),
f("tiff"),
- f("avif"),
- f("jxl"),
f("ppm"),
f("pnm"),
-
- // decode only
- f("heic", true, false), // HEIC encode needs an unsupported compression in this build
- f("heif", true, false),
- f("svg", true, false), // rendered via resvg
- f("uhdr", true, false), // gain map / HDR jpeg, load only
]);
export const VIPS_QUALITY_FORMATS = new Set([
@@ -34,8 +26,6 @@ export const VIPS_QUALITY_FORMATS = new Set([
".jpe",
".jfif",
".webp",
- ".avif",
- ".jxl",
".tif",
".tiff",
]);
diff --git a/src/lib/workers/vips.ts b/src/lib/workers/vips.ts
index 73d7ff0..6dcd765 100644
--- a/src/lib/workers/vips.ts
+++ b/src/lib/workers/vips.ts
@@ -1,9 +1,6 @@
import type { WorkerMessage } from "#lib/types";
import type { ConversionSettings } from "#lib/types/conversion-settings";
import Vips from "wasm-vips";
-import vipsHeifWasm from "wasm-vips/vips-heif.wasm?url";
-import vipsJxlWasm from "wasm-vips/vips-jxl.wasm?url";
-import vipsResvgWasm from "wasm-vips/vips-resvg.wasm?url";
import vipsWasm from "wasm-vips/vips.wasm?url";
type VipsInstance = Awaited<ReturnType<typeof Vips>>;
@@ -11,16 +8,10 @@ type VipsImage = ReturnType<VipsInstance["Image"]["newFromBuffer"]>;
const WASM_URLS: Record<string, string> = {
"vips.wasm": vipsWasm,
- "vips-jxl.wasm": vipsJxlWasm,
- "vips-heif.wasm": vipsHeifWasm,
- "vips-resvg.wasm": vipsResvgWasm,
};
-const DYNAMIC_LIBRARIES = [
- "vips-jxl.wasm",
- "vips-heif.wasm",
- "vips-resvg.wasm",
-];
+// note: dynamic libraries still cause wasm-vips to take a long time to (or never) initialize, imagemagick handles all these anyways
+const DYNAMIC_LIBRARIES: string[] = [];
const NO_QUALITY = new Set([".gif", ".svg", ".ppm", ".pnm"]);
const OPAQUE = new Set([".jpg", ".jpeg", ".jpe", ".jfif", ".ppm", ".pnm"]);