mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-12 00:37:19 +00:00
80 lines
1.9 KiB
JavaScript
80 lines
1.9 KiB
JavaScript
|
|
module.exports = {
|
|
mozjpeg: {
|
|
name: "MozJPEG",
|
|
extension: "jpg",
|
|
detectors: [/^\xFF\xD8\xFF/],
|
|
dec: require("../codecs/mozjpeg/dec/mozjpeg_dec.js"),
|
|
enc: require("../codecs/mozjpeg/enc/mozjpeg_enc.js"),
|
|
defaultEncoderOptions: {
|
|
quality: 75,
|
|
baseline: false,
|
|
arithmetic: false,
|
|
progressive: true,
|
|
optimize_coding: true,
|
|
smoothing: 0,
|
|
color_space: 3 /*YCbCr*/,
|
|
quant_table: 3,
|
|
trellis_multipass: false,
|
|
trellis_opt_zero: false,
|
|
trellis_opt_table: false,
|
|
trellis_loops: 1,
|
|
auto_subsample: true,
|
|
chroma_subsample: 2,
|
|
separate_chroma_quality: false,
|
|
chroma_quality: 75
|
|
}
|
|
},
|
|
webp: {
|
|
name: "WebP",
|
|
extension: "webp",
|
|
detectors: [/^RIFF....WEBPVP8[LX ]/],
|
|
dec: require("../codecs/webp/dec/webp_dec.js"),
|
|
enc: require("../codecs/webp/enc/webp_enc.js"),
|
|
defaultEncoderOptions: {
|
|
quality: 75,
|
|
target_size: 0,
|
|
target_PSNR: 0,
|
|
method: 4,
|
|
sns_strength: 50,
|
|
filter_strength: 60,
|
|
filter_sharpness: 0,
|
|
filter_type: 1,
|
|
partitions: 0,
|
|
segments: 4,
|
|
pass: 1,
|
|
show_compressed: 0,
|
|
preprocessing: 0,
|
|
autofilter: 0,
|
|
partition_limit: 0,
|
|
alpha_compression: 1,
|
|
alpha_filtering: 1,
|
|
alpha_quality: 100,
|
|
lossless: 0,
|
|
exact: 0,
|
|
image_hint: 0,
|
|
emulate_jpeg_size: 0,
|
|
thread_level: 0,
|
|
low_memory: 0,
|
|
near_lossless: 100,
|
|
use_delta_palette: 0,
|
|
use_sharp_yuv: 0
|
|
}
|
|
},
|
|
avif: {
|
|
name: "AVIF",
|
|
extension: "avif",
|
|
detectors: [/^\x00\x00\x00 ftypavif\x00\x00\x00\x00/],
|
|
dec: require("../codecs/avif/dec/avif_dec.js"),
|
|
enc: require("../codecs/avif/enc/avif_enc.js"),
|
|
defaultEncoderOptions: {
|
|
minQuantizer: 16,
|
|
maxQuantizer: 16,
|
|
tileColsLog2: 0,
|
|
tileRowsLog2: 0,
|
|
speed: 10,
|
|
subsample: 0
|
|
}
|
|
}
|
|
};
|