1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-24 08:52:28 +02:00

fix(server): correct rotation for common files (#14092)

* fix(server): correct rotation for common files

* fix: test:

* pr feedback
This commit is contained in:
Alex 2024-11-12 09:07:56 -06:00 committed by GitHub
parent dfa8a8a6e1
commit 2f9019c0e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -214,7 +214,7 @@ export class MediaService extends BaseService {
const colorspace = this.isSRGB(asset) ? Colorspace.SRGB : image.colorspace; const colorspace = this.isSRGB(asset) ? Colorspace.SRGB : image.colorspace;
const processInvalidImages = process.env.IMMICH_PROCESS_INVALID_IMAGES === 'true'; const processInvalidImages = process.env.IMMICH_PROCESS_INVALID_IMAGES === 'true';
const orientation = Number(asset.exifInfo?.orientation) || undefined; const orientation = useExtracted && asset.exifInfo?.orientation ? Number(asset.exifInfo.orientation) : undefined;
const decodeOptions = { colorspace, processInvalidImages, size: image.preview.size, orientation }; const decodeOptions = { colorspace, processInvalidImages, size: image.preview.size, orientation };
const { data, info } = await this.mediaRepository.decodeImage(inputPath, decodeOptions); const { data, info } = await this.mediaRepository.decodeImage(inputPath, decodeOptions);