mirror of
https://github.com/misskey-dev/media-proxy.git
synced 2025-04-29 02:47:26 +09:00
0.0.18
This commit is contained in:
parent
405e6a5adb
commit
d86823e32d
@ -1,11 +1,12 @@
|
|||||||
import sharp from 'sharp';
|
import sharp from 'sharp';
|
||||||
export const webpDefault = {
|
export const webpDefault = {
|
||||||
quality: 85,
|
quality: 77,
|
||||||
alphaQuality: 95,
|
alphaQuality: 95,
|
||||||
lossless: false,
|
lossless: false,
|
||||||
nearLossless: false,
|
nearLossless: false,
|
||||||
smartSubsample: true,
|
smartSubsample: true,
|
||||||
mixed: true,
|
mixed: true,
|
||||||
|
effort: 2,
|
||||||
};
|
};
|
||||||
export function convertToWebpStream(path, width, height, options = webpDefault) {
|
export function convertToWebpStream(path, width, height, options = webpDefault) {
|
||||||
return convertSharpToWebpStream(sharp(path), width, height, options);
|
return convertSharpToWebpStream(sharp(path), width, height, options);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user