The next-generation file converter. Open source, fully local* and free forever.
feat: raw camera formats, swf
Maya8911cdab8d17
diff --git a/src/lib/converters/ffmpeg.svelte.ts b/src/lib/converters/ffmpeg.svelte.tsindex 065eb49..07e3796 100644--- a/src/lib/converters/ffmpeg.svelte.ts+++ b/src/lib/converters/ffmpeg.svelte.ts@@ -56,7 +56,7 @@ export class FFmpegConverter extends Converter {new FormatInfo("mp1", true, false),new FormatInfo("mp2", true, true),new FormatInfo("mpc", true, false), // unknown if it works, can't find sample file but ffmpeg should support i think?- new FormatInfo("raw", true, false), // usually pcm+ //new FormatInfo("raw", true, false), // usually pcmnew FormatInfo("dsd", true, false), // dsdnew FormatInfo("dsf", true, false), // dsdnew FormatInfo("dff", true, false), // dsddiff --git a/src/lib/converters/magick-automated.ts b/src/lib/converters/magick-automated.tsindex fcbb84d..17df80c 100644--- a/src/lib/converters/magick-automated.ts+++ b/src/lib/converters/magick-automated.ts@@ -41,6 +41,7 @@ export const imageFormats = [new FormatInfo("farbfeld", true, true),new FormatInfo("fax", true, true), // not ideal (image became super long for some reason)new FormatInfo("ff", true, true),+ new FormatInfo("fit", true, true), // not ideal (grayscale)new FormatInfo("fits", true, true), // not ideal (grayscale)new FormatInfo("fl32", true, true),new FormatInfo("fts", true, true), // not ideal (grayscale)diff --git a/src/lib/converters/magick.svelte.ts b/src/lib/converters/magick.svelte.tsindex c48815f..1648415 100644--- a/src/lib/converters/magick.svelte.ts+++ b/src/lib/converters/magick.svelte.ts@@ -19,6 +19,7 @@ export class MagickConverter extends Converter {public ready = $state(false);public supportedFormats = [+ // manually tested formatsnew FormatInfo("png", true, true),new FormatInfo("jpeg", true, true),new FormatInfo("jpg", true, true),@@ -40,20 +41,40 @@ export class MagickConverter extends Converter {new FormatInfo("cr2", true, false),new FormatInfo("hdr", true, true),new FormatInfo("jpe", true, true),- new FormatInfo("dng", true, false),new FormatInfo("mat", true, true),new FormatInfo("pbm", true, true),new FormatInfo("pfm", true, true),new FormatInfo("pgm", true, true),new FormatInfo("pnm", true, true),new FormatInfo("ppm", true, true),- new FormatInfo("tif", true, true),new FormatInfo("tiff", true, true),new FormatInfo("jfif", true, true),new FormatInfo("eps", false, true),- new FormatInfo("arw", true, false),new FormatInfo("psd", true, true),+ // raw camera formats+ new FormatInfo("arw", true, false),+ new FormatInfo("tif", true, true),+ new FormatInfo("dng", true, false),+ new FormatInfo("xcf", true, false),+ new FormatInfo("rw2", true, false),+ new FormatInfo("raf", true, false),+ new FormatInfo("orf", true, false),+ new FormatInfo("pef", true, false),+ new FormatInfo("mos", true, false),+ new FormatInfo("raw", true, false),+ new FormatInfo("dcr", true, false),+ new FormatInfo("crw", true, false),+ new FormatInfo("cr3", true, false),+ new FormatInfo("3fr", true, false),+ new FormatInfo("erf", true, false),+ new FormatInfo("mrw", true, false),+ new FormatInfo("mef", true, false),+ new FormatInfo("nrw", true, false),+ new FormatInfo("srw", true, false),+ new FormatInfo("sr2", true, false),+ new FormatInfo("srf", true, false),+// formats added from maya's somewhat automated testing...imageFormats,];diff --git a/src/lib/converters/vertd.svelte.ts b/src/lib/converters/vertd.svelte.tsindex 8216809..1ea3fe2 100644--- a/src/lib/converters/vertd.svelte.ts+++ b/src/lib/converters/vertd.svelte.ts@@ -226,6 +226,7 @@ export class VertdConverter extends Converter {new FormatInfo("rmvb", true, false),new FormatInfo("h264", true, true),new FormatInfo("divx", true, true),+ new FormatInfo("swf", true, true),];// eslint-disable-next-line @typescript-eslint/no-explicit-anydiff --git a/src/lib/workers/magick.ts b/src/lib/workers/magick.tsindex 1db298a..b287e9b 100644--- a/src/lib/workers/magick.ts+++ b/src/lib/workers/magick.ts@@ -28,13 +28,9 @@ const handleMessage = async (message: any): Promise<any> => {case "convert": {if (!message.to.startsWith(".")) message.to = `.${message.to}`;message.to = message.to.toLowerCase();- if (message.to === ".jfif") {- message.to = ".jpeg";- }-- if (message.input.from === ".jfif") {- message.input.from = ".jpeg";- }+ if (message.to === ".jfif") message.to = ".jpeg";+ if (message.input.from === ".jfif") message.input.from = ".jpeg";+ if (message.input.from === ".fit") message.input.from = ".fits";const buffer = await message.input.file.arrayBuffer();// only wait when we need to