1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-28 06:31:58 +00: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 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 { data, info } = await this.mediaRepository.decodeImage(inputPath, decodeOptions);