aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/image-utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/image-utils.ts')
-rw-r--r--server/helpers/image-utils.ts3
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 @@
1import { copy, readFile, remove, rename } from 'fs-extra' 1import { copy, readFile, remove, rename } from 'fs-extra'
2import Jimp, { read as jimpRead } from 'jimp' 2import Jimp, { read as jimpRead } from 'jimp'
3import { join } from 'path' 3import { join } from 'path'
4import { ColorActionName } from '@jimp/plugin-color'
4import { getLowercaseExtension } from '@shared/core-utils' 5import { getLowercaseExtension } from '@shared/core-utils'
5import { buildUUID } from '@shared/extra-utils' 6import { buildUUID } from '@shared/extra-utils'
6import { convertWebPToJPG, generateThumbnailFromVideo, processGIF } from './ffmpeg' 7import { 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