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 Oct 2, 2024
1 parent 355ed5b commit 8ee8259
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 8ee8259

Please sign in to comment.