Removed non-Identity matrix in non-PCSXYZ Input check for ICC profiles

The presence seems to be disallowed in the specs (10.8/10.9), but two
test images on the ICC website have them, and fail if we abort. Replaced
the failure with a print warning.

BUG=skia:

Change-Id: I463f1a8861eaa0eb62081c3213017dba9012c890
Reviewed-on: https://skia-review.googlesource.com/5658
Reviewed-by: Matt Sarett <msarett@google.com>
Commit-Queue: Robert Aftias <raftias@google.com>
This commit is contained in:
raftias 2016-12-08 11:56:34 -05:00 committed by Skia Commit-Bot
parent 419d81eed4
commit fc6d9e9540

View File

@ -1113,8 +1113,11 @@ bool load_a2b0_lutn_type(std::vector<SkColorSpace_A2B::Element>* elements, const
// ICC specs (10.8/10.9) say lut8/16Type profiles must have identity matrices
// if the input color space is not PCSXYZ, and we do not support PCSXYZ input color spaces
// so we should never encounter a non-identity matrix here.
SkColorSpacePrintf("non-Identity matrix found in non-XYZ input color space lut profile");
return false;
// However, 2 test images from the ICC website have RGB input spaces and non-identity
// matrices so we're not going to fail here, despite being against the spec.
SkColorSpacePrintf("Warning: non-Identity matrix found in non-XYZ input color space"
"lut profile");
elements->push_back(SkColorSpace_A2B::Element(matrix));
}
size_t dataOffset = 48;