Skip to content

Commit

Permalink
fix(server): thumbnail colorspace handling (immich-app#13130)
Browse files Browse the repository at this point in the history
fix colorspace handling
  • Loading branch information
mertalev authored and Yosi Taguri committed Oct 3, 2024
1 parent bd9e6f4 commit 6b5fea3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions server/src/repositories/media.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,12 @@ export class MediaRepository implements IMediaRepository {
failOn: options.processInvalidImages ? 'none' : 'error',
limitInputPixels: false,
raw: options.raw,
});
})
.pipelineColorspace(options.colorspace === Colorspace.SRGB ? 'srgb' : 'rgb16')
.withIccProfile(options.colorspace);

if (!options.raw) {
pipeline = pipeline
.pipelineColorspace(options.colorspace === Colorspace.SRGB ? 'srgb' : 'rgb16')
.withIccProfile(options.colorspace)
.rotate();
pipeline = pipeline.rotate();
}

if (options.crop) {
Expand Down

0 comments on commit 6b5fea3

Please sign in to comment.