Diffusion Krita 0381878fcb6c

Fix a crash when loading JPEG image with a weird color profile

Authored by dkazakov on Sep 11 2019, 8:54 AM.

Description

Fix a crash when loading JPEG image with a weird color profile

The profile in question has a weird RGB->XYZ transformation matrix,
which is not invertible. Therefore, this profile cannot be used as
a workspace color profile and we should convert the image to sRGB
right on loading.

LCMS doesn't have a separate method for checking if conversion matrix
is invertible, therefore we just try to create a simple transformation,
where the profile is both, input and output. If the transformation
is created successfully, then this profile is probably suitable for
usage as a working color space.

BUG:410864

Details

Committed
dkazakovSep 11 2019, 8:57 AM
Parents
R37:46ad1506e289: Fix memory leak in KisJPEGConverter
Branches
Unknown
Tags
Unknown
References
refs/keep-around/0381878fcb6c06fd2f657ce46b28176e46db5ba4