aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party
diff options
context:
space:
mode:
Diffstat (limited to 'third_party')
-rw-r--r--third_party/skcms/src/Transform.c11
-rwxr-xr-xthird_party/skcms/version.sha12
2 files changed, 8 insertions, 5 deletions
diff --git a/third_party/skcms/src/Transform.c b/third_party/skcms/src/Transform.c
index 0de0727241..f07c5e7ba4 100644
--- a/third_party/skcms/src/Transform.c
+++ b/third_party/skcms/src/Transform.c
@@ -404,9 +404,12 @@ bool skcms_Transform(const void* src,
}
int n = (int)nz;
- // Both profiles can be null if we're just doing format conversion, otherwise both are needed
- if (!dstProfile != !srcProfile) {
- return false;
+ // Null profiles default to sRGB. Passing null for both is handy when doing format conversion.
+ if (!srcProfile) {
+ srcProfile = skcms_sRGB_profile();
+ }
+ if (!dstProfile) {
+ dstProfile = skcms_sRGB_profile();
}
// We can't transform in place unless the PixelFormats are the same size.
@@ -442,7 +445,7 @@ bool skcms_Transform(const void* src,
*ops++ = Op_swap_rb;
}
- if (srcProfile && srcProfile->data_color_space == skcms_Signature_CMYK) {
+ if (srcProfile->data_color_space == skcms_Signature_CMYK) {
// Photoshop creates CMYK images as inverse CMYK.
// These happen to be the only ones we've _ever_ seen.
*ops++ = Op_invert;
diff --git a/third_party/skcms/version.sha1 b/third_party/skcms/version.sha1
index bb0a7989f9..52ffc8c575 100755
--- a/third_party/skcms/version.sha1
+++ b/third_party/skcms/version.sha1
@@ -1 +1 @@
-eb7de4255855f321ab1ab7a53bc8825c26cbd0e2 \ No newline at end of file
+78ef7c5c81fb084fa67c7994501c3edd86aef909 \ No newline at end of file