summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarti Maria <info@littlecms.com>2011-04-05 17:05:31 +0200
committerMarti Maria <info@littlecms.com>2011-04-05 17:05:31 +0200
commit347e78ed167371361e6b707c6804db6b1f609c14 (patch)
tree46f504fd33088d58f43fdbe6fd25cb858a08c232
parent900e457fe3902a83fc6cd9722b8b30f8532c06fb (diff)
downloadlcms2-347e78ed167371361e6b707c6804db6b1f609c14.tar.gz
2.2 additions and some bugfixing
-rw-r--r--AUTHORS1
-rwxr-xr-xdoc/LittleCMS2.1 API.pdfbin1073413 -> 1075972 bytes
-rw-r--r--include/lcms2.h4
-rw-r--r--src/cmscnvrt.c5
-rw-r--r--src/cmsxform.c15
-rw-r--r--src/lcms2_internal.h4
-rw-r--r--utils/linkicc/linkicc.12
-rw-r--r--utils/linkicc/linkicc.c2
8 files changed, 27 insertions, 6 deletions
diff --git a/AUTHORS b/AUTHORS
index 384d8a0..47e0d3b 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -16,6 +16,7 @@ Richard Hughes
Auke Nauta
Chris Evans
Lorenzo Ridolfi
+Robin Watts
Special Thanks
diff --git a/doc/LittleCMS2.1 API.pdf b/doc/LittleCMS2.1 API.pdf
index d5a637a..02b5977 100755
--- a/doc/LittleCMS2.1 API.pdf
+++ b/doc/LittleCMS2.1 API.pdf
Binary files differ
diff --git a/include/lcms2.h b/include/lcms2.h
index 16c1b46..acdc6b5 100644
--- a/include/lcms2.h
+++ b/include/lcms2.h
@@ -1615,6 +1615,10 @@ CMSAPI cmsFloat64Number CMSEXPORT cmsSetAdaptationState(cmsFloat64Number d);
// Grab the ContextID from an open transform. Returns NULL if a NULL transform is passed
CMSAPI cmsContext CMSEXPORT cmsGetTransformContextID(cmsHTRANSFORM hTransform);
+// Grab the input/output formats
+CMSAPI cmsUInt32Number CMSEXPORT cmsGetTransformInputFormat(cmsHTRANSFORM hTransform);
+CMSAPI cmsUInt32Number CMSEXPORT cmsGetTransformOutputFormat(cmsHTRANSFORM hTransform);
+
// For backwards compatibility
CMSAPI cmsBool CMSEXPORT cmsChangeBuffersFormat(cmsHTRANSFORM hTransform,
cmsUInt32Number InputFormat,
diff --git a/src/cmscnvrt.c b/src/cmscnvrt.c
index 5c76d27..9490a9e 100644
--- a/src/cmscnvrt.c
+++ b/src/cmscnvrt.c
@@ -1,7 +1,7 @@
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2010 Marti Maria Saguer
+// Copyright (c) 1998-2011 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
@@ -847,7 +847,8 @@ cmsPipeline* BlackPreservingKPlaneIntents(cmsContext ContextID,
// Check for non-cmyk profiles
if (cmsGetColorSpace(hProfiles[0]) != cmsSigCmykData ||
- cmsGetColorSpace(hProfiles[nProfiles-1]) != cmsSigCmykData)
+ cmsGetColorSpace(hProfiles[nProfiles-1]) != cmsSigCmykData ||
+ cmsGetDeviceClass(hProfiles[nProfiles-1]) != cmsSigOutputClass))
return DefaultICCintents(ContextID, nProfiles, ICCIntents, hProfiles, BPC, AdaptationStates, dwFlags);
// Allocate an empty LUT for holding the result
diff --git a/src/cmsxform.c b/src/cmsxform.c
index 0d34001..4e13e1a 100644
--- a/src/cmsxform.c
+++ b/src/cmsxform.c
@@ -752,7 +752,22 @@ cmsContext CMSEXPORT cmsGetTransformContextID(cmsHTRANSFORM hTransform)
return xform -> ContextID;
}
+// Grab the input/output formats
+cmsUInt32Number CMSEXPORT cmsGetTransformInputFormat(cmsHTRANSFORM hTransform)
+{
+ _cmsTRANSFORM* xform = (_cmsTRANSFORM*) hTransform;
+
+ if (xform == NULL) return 0;
+ return xform->InputFormat;
+}
+cmsUInt32Number CMSEXPORT cmsGetTransformOutputFormat(cmsHTRANSFORM hTransform)
+{
+ _cmsTRANSFORM* xform = (_cmsTRANSFORM*) hTransform;
+
+ if (xform == NULL) return 0;
+ return xform->OutputFormat;
+}
// For backwards compatibility
cmsBool CMSEXPORT cmsChangeBuffersFormat(cmsHTRANSFORM hTransform,
diff --git a/src/lcms2_internal.h b/src/lcms2_internal.h
index 8cb8bd0..cdcba71 100644
--- a/src/lcms2_internal.h
+++ b/src/lcms2_internal.h
@@ -46,8 +46,8 @@
# define M_LOG10E 0.434294481903251827651
#endif
-// BorlandC 5.5 is broken on that
-#ifdef __BORLANDC__
+// BorlandC 5.5, VC2003 are broken on that
+#if defined(__BORLANDC__) || (_MSC_VER <= 1400) // 1400 == VC++ 8.0
#define sinf(x) (float)sin((float)x)
#define sqrtf(x) (float)sqrt((float)x)
#endif
diff --git a/utils/linkicc/linkicc.1 b/utils/linkicc/linkicc.1
index 2d0093a..7d78db2 100644
--- a/utils/linkicc/linkicc.1
+++ b/utils/linkicc/linkicc.1
@@ -22,7 +22,7 @@ Creates 8-bit devicelink.
Black point compensation.
.TP
.B \-c <0,1,2,3>
-Precission (0=LowRes, 1=Normal, 2=Hi-res). [defaults to 1]
+Precision (0=LowRes, 1=Normal, 2=Hi-res). [defaults to 1]
.TP
.BI \-d\ description
Description text (quotes can be used).
diff --git a/utils/linkicc/linkicc.c b/utils/linkicc/linkicc.c
index 921562a..d67786f 100644
--- a/utils/linkicc/linkicc.c
+++ b/utils/linkicc/linkicc.c
@@ -1,7 +1,7 @@
//---------------------------------------------------------------------------------
//
// Little Color Management System
-// Copyright (c) 1998-2010 Marti Maria Saguer
+// Copyright (c) 1998-2011 Marti Maria Saguer
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),