fix(server): thumbnail colorspace handling (#13130)

fix colorspace handling
This commit is contained in:
Mert authored and GitHub committed 2024-10-02 20:53:17 +00:00
1 parent 355ed5be72
commit 8ee825964d
1 file changed
+4 -5
+4 -5
View File
@@ -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) {