diff --git a/src/lib/converters/magick-automated.ts b/src/lib/converters/magick-automated.ts new file mode 100644 index 0000000..8715bca --- /dev/null +++ b/src/lib/converters/magick-automated.ts @@ -0,0 +1,142 @@ +import { FormatInfo } from "./converter.svelte"; + +// formats added from maya's somewhat automated testing +// placed into this file to easily differentiate (and also clean up the main magick file) +// some formats also have a comment from what i saw during testing +export const imageFormats = [ + new FormatInfo("a", false, true), + new FormatInfo("aai", true, true), + new FormatInfo("ai", false, true), + new FormatInfo("art", true, false), + new FormatInfo("avs", true, true), + new FormatInfo("b", false, true), + new FormatInfo("bgr", false, true), + new FormatInfo("bgra", false, true), + new FormatInfo("bgro", false, true), + new FormatInfo("bmp2", true, true), + new FormatInfo("bmp3", true, true), + new FormatInfo("brf", false, true), + new FormatInfo("cal", false, true), + new FormatInfo("cals", false, true), + new FormatInfo("cin", true, true), // not ideal (made the image more "shadowy"?) + new FormatInfo("cip", false, true), + new FormatInfo("cmyk", false, true), + new FormatInfo("cmyka", false, true), + new FormatInfo("dcx", true, true), + new FormatInfo("dds", true, true), + new FormatInfo("dpx", true, true), + new FormatInfo("dxt1", true, true), + new FormatInfo("dxt5", true, true), + new FormatInfo("epdf", false, true), + new FormatInfo("epi", false, true), + new FormatInfo("eps2", false, true), + new FormatInfo("eps3", false, true), + new FormatInfo("epsf", false, true), + new FormatInfo("epsi", false, true), + new FormatInfo("ept", false, true), + new FormatInfo("ept2", false, true), + new FormatInfo("ept3", false, true), + new FormatInfo("exr", true, true), + 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("fits", true, true), // not ideal (grayscale) + new FormatInfo("fl32", true, true), + new FormatInfo("fts", true, true), // not ideal (grayscale) + new FormatInfo("ftxt", false, true), + new FormatInfo("g", false, true), + new FormatInfo("g3", true, true), // not ideal (image became super long for some reason) + new FormatInfo("g4", false, true), + new FormatInfo("gif87", true, true), + new FormatInfo("gray", false, true), + new FormatInfo("graya", false, true), + new FormatInfo("group4", false, true), + new FormatInfo("hrz", true, true), + new FormatInfo("icb", true, true), + new FormatInfo("icon", true, true), + new FormatInfo("info", false, true), + new FormatInfo("ipl", true, true), + new FormatInfo("isobrl", false, true), + new FormatInfo("isobrl6", false, true), + new FormatInfo("j2c", true, true), + new FormatInfo("j2k", true, true), + new FormatInfo("jng", true, true), + new FormatInfo("jp2", true, true), + new FormatInfo("jpc", true, true), + new FormatInfo("jpm", true, true), + new FormatInfo("jps", true, true), + new FormatInfo("json", false, true), + new FormatInfo("map", false, true), + new FormatInfo("miff", true, true), + new FormatInfo("mng", true, true), + new FormatInfo("mono", false, true), + new FormatInfo("mpc", true, true), // not ideal (literally empty lol) + new FormatInfo("msvg", false, true), + new FormatInfo("mtv", true, true), + new FormatInfo("o", false, true), + new FormatInfo("otb", true, true), // not ideal (completely black and white - maybe format is like that) + new FormatInfo("pal", false, true), + new FormatInfo("palm", true, true), // not ideal (screwed up colours) + new FormatInfo("pam", true, true), + new FormatInfo("pcd", true, true), // not ideal (turned big, bg orange, and colour just shifted? - maybe format) + new FormatInfo("pcds", true, true), // not ideal (turned big, bg orange, and colour just shifted? - maybe format) + new FormatInfo("pcl", false, true), + new FormatInfo("pct", true, true), + new FormatInfo("pcx", true, true), + new FormatInfo("pdb", true, true), // not ideal (completely black and white - maybe format is like that) + new FormatInfo("pdf", false, true), + new FormatInfo("pdfa", false, true), + new FormatInfo("pgx", true, true), // not ideal (grayscale - maybe format is like that) + new FormatInfo("phm", true, true), + new FormatInfo("picon", true, true), // not ideal (smudged out colours - format probably) + new FormatInfo("pict", true, true), + new FormatInfo("pjpeg", true, true), + new FormatInfo("png00", true, true), + new FormatInfo("png24", true, true), + new FormatInfo("png32", true, true), + new FormatInfo("png48", true, true), + new FormatInfo("png64", true, true), + new FormatInfo("png8", true, true), + new FormatInfo("ps", false, true), + new FormatInfo("ps1", false, true), + new FormatInfo("ps2", false, true), + new FormatInfo("ps3", false, true), + new FormatInfo("psb", true, true), + new FormatInfo("ptif", true, true), + new FormatInfo("py", false, true), + new FormatInfo("qoi", true, true), + new FormatInfo("r", false, true), + new FormatInfo("ras", true, true), + new FormatInfo("rgb", false, true), + new FormatInfo("rgba", false, true), + new FormatInfo("rgbo", false, true), + new FormatInfo("rgf", true, true), // not ideal (completely black and white - maybe format is like that) + new FormatInfo("sgi", true, true), + new FormatInfo("six", true, true), + new FormatInfo("sixel", true, true), + new FormatInfo("sparse-color", false, true), + new FormatInfo("strimg", false, true), + new FormatInfo("sun", true, true), + new FormatInfo("svgz", false, true), + new FormatInfo("tga", true, true), + new FormatInfo("tiff64", true, true), + new FormatInfo("txt", true, true), + new FormatInfo("ubrl", false, true), + new FormatInfo("ubrl6", false, true), + new FormatInfo("uil", false, true), + new FormatInfo("uyvy", false, true), + new FormatInfo("vda", true, true), + new FormatInfo("vicar", true, true), // not ideal (grayscale - maybe format is like that) + new FormatInfo("viff", true, true), + new FormatInfo("vips", true, true), + new FormatInfo("vst", true, true), + new FormatInfo("wbmp", true, true), // not ideal (completely black and white - maybe format is like that) + new FormatInfo("wpg", true, true), + new FormatInfo("xbm", true, true), // not ideal (completely black and white - maybe format is like that) + new FormatInfo("xpm", true, true), + new FormatInfo("xv", true, true), + new FormatInfo("yaml", false, true), + new FormatInfo("ycbcr", false, true), + new FormatInfo("ycbcra", false, true), + new FormatInfo("yuv", false, true), +]; diff --git a/src/lib/converters/magick.svelte.ts b/src/lib/converters/magick.svelte.ts index 2266826..072347d 100644 --- a/src/lib/converters/magick.svelte.ts +++ b/src/lib/converters/magick.svelte.ts @@ -5,6 +5,7 @@ import type { OmitBetterStrict, WorkerMessage } from "$lib/types"; import { VertFile } from "$lib/types"; import MagickWorker from "$lib/workers/magick?worker&url"; import { Converter, FormatInfo } from "./converter.svelte"; +import { imageFormats } from "./magick-automated"; export class MagickConverter extends Converter { private worker: Worker = browser @@ -50,6 +51,10 @@ export class MagickConverter extends Converter { new FormatInfo("jfif", true, true), new FormatInfo("eps", false, true), new FormatInfo("arw", true, false), + new FormatInfo("psd", true, true), + + // formats added from maya's somewhat automated testing + ...imageFormats, ]; public readonly reportsProgress = false;