aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkColorSpace_ICC.cpp
diff options
context:
space:
mode:
authorGravatar raftias <raftias@google.com>2016-12-08 11:56:34 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-12-08 18:09:16 +0000
commitfc6d9e95407293fbbabb0388ebbe311403a896bc (patch)
treef475e1e6e60ab7925e28c2704cf98bc1653de019 /src/core/SkColorSpace_ICC.cpp
parent419d81eed4a010e6080db199795117cbedf9e6e4 (diff)
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>
Diffstat (limited to 'src/core/SkColorSpace_ICC.cpp')
-rw-r--r--src/core/SkColorSpace_ICC.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/SkColorSpace_ICC.cpp b/src/core/SkColorSpace_ICC.cpp
index 04e240a6de..2ae1090483 100644
--- a/src/core/SkColorSpace_ICC.cpp
+++ b/src/core/SkColorSpace_ICC.cpp
@@ -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;