fix(core): update
This commit is contained in:
@@ -5,6 +5,7 @@ export interface IAssetVariation {
|
||||
format?: 'avif' | 'webp' | 'png';
|
||||
width?: number;
|
||||
height?: number;
|
||||
invert?: boolean;
|
||||
}
|
||||
|
||||
export interface ISmartJimpOptions {
|
||||
@@ -80,6 +81,9 @@ export class SmartJimp {
|
||||
if (assetVariationArg.width || assetVariationArg.height) {
|
||||
jimpImage = jimpImage.resize(assetVariationArg.width, assetVariationArg.height);
|
||||
}
|
||||
if (assetVariationArg.invert) {
|
||||
jimpImage = jimpImage.invert();
|
||||
}
|
||||
switch (assetVariationArg.format) {
|
||||
case 'png':
|
||||
return await jimpImage.getBufferAsync(jimp.MIME_PNG);
|
||||
|
Reference in New Issue
Block a user