mirror of
https://github.com/immich-app/immich.git
synced 2025-12-23 09:15:05 +03:00
fix(server): use srgb pipeline for srgb images (#4101)
* added color-related exif fields * remove metadata check, conditional pipe colorspace * check exif metadata for srgb * added migration * updated e2e fixture * uncased srgb check, search substrings * extracted exif logic into separate function * handle images with no bit depth or color metadata * added unit tests
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class AddExifColorSpace1694750975773 implements MigrationInterface {
|
||||
name = 'AddExifColorSpace1694750975773'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "exif" ADD "profileDescription" character varying`);
|
||||
await queryRunner.query(`ALTER TABLE "exif" ADD "colorspace" character varying`);
|
||||
await queryRunner.query(`ALTER TABLE "exif" ADD "bitsPerSample" integer`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "exif" DROP COLUMN "bitsPerSample"`);
|
||||
await queryRunner.query(`ALTER TABLE "exif" DROP COLUMN "colorspace"`);
|
||||
await queryRunner.query(`ALTER TABLE "exif" DROP COLUMN "profileDescription"`);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user