diff options
Diffstat (limited to 'server/helpers/image-utils.ts')
-rw-r--r-- | server/helpers/image-utils.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/helpers/image-utils.ts b/server/helpers/image-utils.ts index 05b258d8a..f86f7216d 100644 --- a/server/helpers/image-utils.ts +++ b/server/helpers/image-utils.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import { copy, readFile, remove, rename } from 'fs-extra' | 1 | import { copy, readFile, remove, rename } from 'fs-extra' |
2 | import Jimp, { read as jimpRead } from 'jimp' | 2 | import Jimp, { read as jimpRead } from 'jimp' |
3 | import { join } from 'path' | 3 | import { join } from 'path' |
4 | import { ColorActionName } from '@jimp/plugin-color' | ||
4 | import { getLowercaseExtension } from '@shared/core-utils' | 5 | import { getLowercaseExtension } from '@shared/core-utils' |
5 | import { buildUUID } from '@shared/extra-utils' | 6 | import { buildUUID } from '@shared/extra-utils' |
6 | import { convertWebPToJPG, generateThumbnailFromVideo, processGIF } from './ffmpeg' | 7 | import { convertWebPToJPG, generateThumbnailFromVideo, processGIF } from './ffmpeg' |
@@ -131,7 +132,7 @@ async function autoResize (options: { | |||
131 | 132 | ||
132 | if (sourceIsPortrait && !destIsPortraitOrSquare) { | 133 | if (sourceIsPortrait && !destIsPortraitOrSquare) { |
133 | const baseImage = sourceImage.cloneQuiet().cover(newSize.width, newSize.height) | 134 | const baseImage = sourceImage.cloneQuiet().cover(newSize.width, newSize.height) |
134 | .color([ { apply: 'shade', params: [ 50 ] } ]) | 135 | .color([ { apply: ColorActionName.SHADE, params: [ 50 ] } ]) |
135 | 136 | ||
136 | const topImage = sourceImage.cloneQuiet().contain(newSize.width, newSize.height) | 137 | const topImage = sourceImage.cloneQuiet().contain(newSize.width, newSize.height) |
137 | 138 | ||