summaryrefslogtreecommitdiff
path: root/icc
diff options
context:
space:
mode:
Diffstat (limited to 'icc')
-rw-r--r--icc/README39
-rw-r--r--icc/SampleICC-1.3.2.patch5142
-rw-r--r--icc/makefile.mk58
-rw-r--r--icc/makefiles.zipbin0 -> 4073 bytes
-rw-r--r--icc/prj/build.lst3
-rw-r--r--icc/prj/d.lst5
-rw-r--r--icc/source/create_sRGB_profile/Makefile.am13
-rw-r--r--icc/source/create_sRGB_profile/Makefile.in378
-rw-r--r--icc/source/create_sRGB_profile/create_sRGB_profile.cpp551
9 files changed, 6189 insertions, 0 deletions
diff --git a/icc/README b/icc/README
new file mode 100644
index 000000000000..672371d411ad
--- /dev/null
+++ b/icc/README
@@ -0,0 +1,39 @@
+Date: 2008-01-11
+
+This project is used to generate the ICC color
+profile needed in module vcl in order to export
+to PDF/A-1a.
+It's composed of a small application, which lurks in:
+
+icc/source/create_sRGB_profile
+
+That application links to a support library
+(icc/download/SampleICC-1.3.2), build at OOo
+build time.
+Finally, the application is run at OOo build time to
+generate the only file delivered to solver:
+sRGB-IEC61966-2.1.hxx.
+
+If you need to change the data into the ICC profile,
+please change the create_sRGB_profile.
+
+The library was downloaded from:
+http://sampleicc.sourceforge.net
+on 2007-08-23.
+
+For information on ICC profiles, you may want to visit:
+http://www.color.org
+
+Notes for porters
+=================
+the endianess and other platform specific configuration
+are in:
+
+<build>/misc/build/SampleICC-1.3.2/IccProfLib/IccProfLibConf.h
+
+The patchs:
+SampleICC-1.3.2.patch tweaks the build to use the endianness
+detected in sal.
+
+beppec56@openoffice.org
+
diff --git a/icc/SampleICC-1.3.2.patch b/icc/SampleICC-1.3.2.patch
new file mode 100644
index 000000000000..581b8e3c8b3f
--- /dev/null
+++ b/icc/SampleICC-1.3.2.patch
@@ -0,0 +1,5142 @@
+*** misc/SampleICC-1.3.2/configure Mon Aug 20 22:10:59 2007
+--- misc/build/SampleICC-1.3.2/configure Fri Jan 25 14:23:09 2008
+***************
+*** 19991,19997 ****
+
+
+
+! ac_config_files="$ac_config_files Makefile IccProfLib/Makefile Tools/Makefile Tools/CmdLine/Makefile Tools/CmdLine/IccApplyNamedCmm/Makefile Tools/CmdLine/IccApplyProfiles/Makefile Tools/CmdLine/IccDumpProfile/Makefile Tools/CmdLine/IccProfLibTest/Makefile Tools/CmdLine/IccStripUnknownTags/Makefile Tools/CmdLine/IccV4ToMPE/Makefile Contrib/Makefile Contrib/CmdLine/Makefile Contrib/CmdLine/create_CLUT_profile/Makefile Contrib/CmdLine/create_CLUT_profile_from_probe/Makefile Contrib/CmdLine/create_display_profile/Makefile Contrib/ICC_utils/Makefile Contrib/Mac_OS_X/Makefile Contrib/Mac_OS_X/create_probe/Makefile Contrib/Mac_OS_X/extract_probe_data/Makefile Contrib/examples/Makefile Contrib/examples/RSR/Makefile Contrib/tests/Makefile Contrib/tests/flatten_AToB_tag/Makefile Contrib/tests/generate_device_codes/Makefile Contrib/tests/reconstruct_measurements/Makefile Contrib/tests/round_trip_PCS_LAB/Makefile"
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+ # tests run on this system so they can be shared between configure
+--- 19991,19997 ----
+
+
+
+! ac_config_files="$ac_config_files Makefile IccProfLib/Makefile Tools/Makefile Tools/CmdLine/Makefile Tools/CmdLine/IccDumpProfile/Makefile Tools/CmdLine/IccProfLibTest/Makefile Tools/CmdLine/IccStripUnknownTags/Makefile Tools/CmdLine/IccV4ToMPE/Makefile Contrib/Makefile Contrib/CmdLine/Makefile Contrib/ICC_utils/Makefile Contrib/CmdLine/create_sRGB_profile/Makefile"
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+ # tests run on this system so they can be shared between configure
+***************
+*** 20571,20578 ****
+ "IccProfLib/Makefile" ) CONFIG_FILES="$CONFIG_FILES IccProfLib/Makefile" ;;
+ "Tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/Makefile" ;;
+ "Tools/CmdLine/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/Makefile" ;;
+- "Tools/CmdLine/IccApplyNamedCmm/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccApplyNamedCmm/Makefile" ;;
+- "Tools/CmdLine/IccApplyProfiles/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccApplyProfiles/Makefile" ;;
+ "Tools/CmdLine/IccDumpProfile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccDumpProfile/Makefile" ;;
+ "Tools/CmdLine/IccProfLibTest/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccProfLibTest/Makefile" ;;
+ "Tools/CmdLine/IccStripUnknownTags/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccStripUnknownTags/Makefile" ;;
+--- 20571,20576 ----
+***************
+*** 20579,20598 ****
+ "Tools/CmdLine/IccV4ToMPE/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccV4ToMPE/Makefile" ;;
+ "Contrib/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Makefile" ;;
+ "Contrib/CmdLine/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/Makefile" ;;
+! "Contrib/CmdLine/create_CLUT_profile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_CLUT_profile/Makefile" ;;
+! "Contrib/CmdLine/create_CLUT_profile_from_probe/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_CLUT_profile_from_probe/Makefile" ;;
+! "Contrib/CmdLine/create_display_profile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_display_profile/Makefile" ;;
+ "Contrib/ICC_utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/ICC_utils/Makefile" ;;
+- "Contrib/Mac_OS_X/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Mac_OS_X/Makefile" ;;
+- "Contrib/Mac_OS_X/create_probe/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Mac_OS_X/create_probe/Makefile" ;;
+- "Contrib/Mac_OS_X/extract_probe_data/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Mac_OS_X/extract_probe_data/Makefile" ;;
+- "Contrib/examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/examples/Makefile" ;;
+- "Contrib/examples/RSR/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/examples/RSR/Makefile" ;;
+- "Contrib/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/Makefile" ;;
+- "Contrib/tests/flatten_AToB_tag/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/flatten_AToB_tag/Makefile" ;;
+- "Contrib/tests/generate_device_codes/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/generate_device_codes/Makefile" ;;
+- "Contrib/tests/reconstruct_measurements/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/reconstruct_measurements/Makefile" ;;
+- "Contrib/tests/round_trip_PCS_LAB/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/round_trip_PCS_LAB/Makefile" ;;
+ "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+ echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+--- 20577,20584 ----
+ "Tools/CmdLine/IccV4ToMPE/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccV4ToMPE/Makefile" ;;
+ "Contrib/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Makefile" ;;
+ "Contrib/CmdLine/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/Makefile" ;;
+! "Contrib/CmdLine/create_sRGB_profile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_sRGB_profile/Makefile" ;;
+ "Contrib/ICC_utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/ICC_utils/Makefile" ;;
+ "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+ echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+*** misc/SampleICC-1.3.2/Contrib/Makefile.in Mon Aug 20 22:10:37 2007
+--- misc/build/SampleICC-1.3.2/Contrib/Makefile.in Fri Jan 25 14:23:09 2008
+***************
+*** 103,120 ****
+
+ SUBDIRS = \
+ ICC_utils \
+! CmdLine \
+! examples \
+! Mac_OS_X \
+! tests
+
+
+ DIST_SUBDIRS = \
+ ICC_utils \
+! CmdLine \
+! examples \
+! Mac_OS_X \
+! tests
+
+ subdir = Contrib
+ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+--- 103,114 ----
+
+ SUBDIRS = \
+ ICC_utils \
+! CmdLine
+
+
+ DIST_SUBDIRS = \
+ ICC_utils \
+! CmdLine
+
+ subdir = Contrib
+ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+*** misc/SampleICC-1.3.2/Contrib/CmdLine/Makefile.in Mon Aug 20 22:10:34 2007
+--- misc/build/SampleICC-1.3.2/Contrib/CmdLine/Makefile.in Fri Jan 25 14:23:09 2008
+***************
+*** 102,116 ****
+ install_sh = @install_sh@
+
+ SUBDIRS = \
+! create_CLUT_profile \
+! create_CLUT_profile_from_probe \
+! create_display_profile
+
+
+ DIST_SUBDIRS = \
+! create_CLUT_profile \
+! create_CLUT_profile_from_probe \
+! create_display_profile
+
+ subdir = Contrib/CmdLine
+ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+--- 102,112 ----
+ install_sh = @install_sh@
+
+ SUBDIRS = \
+! create_sRGB_profile
+
+
+ DIST_SUBDIRS = \
+! create_sRGB_profile
+
+ subdir = Contrib/CmdLine
+ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+*** misc/SampleICC-1.3.2/Contrib/ICC_utils/Makefile.in Mon Aug 20 22:10:35 2007
+--- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Makefile.in Fri Jan 25 14:23:09 2008
+***************
+*** 133,139 ****
+ CONFIG_CLEAN_FILES =
+ LTLIBRARIES = $(lib_LTLIBRARIES)
+
+! libICC_utils_la_LIBADD =
+ am_libICC_utils_la_OBJECTS = Stubs.lo CAT.lo CLUT.lo CLUT_stuffer.lo \
+ ICC_tool_exception.lo Vetters.lo
+ libICC_utils_la_OBJECTS = $(am_libICC_utils_la_OBJECTS)
+--- 133,139 ----
+ CONFIG_CLEAN_FILES =
+ LTLIBRARIES = $(lib_LTLIBRARIES)
+
+! libICC_utils_la_LIBADD = $(LDADD)
+ am_libICC_utils_la_OBJECTS = Stubs.lo CAT.lo CLUT.lo CLUT_stuffer.lo \
+ ICC_tool_exception.lo Vetters.lo
+ libICC_utils_la_OBJECTS = $(am_libICC_utils_la_OBJECTS)
+*** misc/SampleICC-1.3.2/Contrib/ICC_utils/Stubs.h Mon Aug 20 22:04:53 2007
+--- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Stubs.h Fri Jan 25 14:23:09 2008
+***************
+*** 130,136 ****
+
+ // use one of these to force desired sort order in assoc. containers of DPX
+ bool
+! DPX::operator<(const DPX& p) const
+ {
+ return (r_ != p.r_) ? (r_ < p.r_) : ((g_ != p.g_) ? (g_ < p.g_) : (b_ < p.b_));
+ }
+--- 130,136 ----
+
+ // use one of these to force desired sort order in assoc. containers of DPX
+ bool
+! operator<(const DPX& p) const
+ {
+ return (r_ != p.r_) ? (r_ < p.r_) : ((g_ != p.g_) ? (g_ < p.g_) : (b_ < p.b_));
+ }
+*** misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.cpp Mon Aug 20 22:04:54 2007
+--- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.cpp Fri Jan 25 14:57:06 2008
+***************
+*** 1,322 ****
+! /*
+! File: Vetters.cpp
+!
+! Contains: Utility functions to handle common argument-checking tasks, in a
+! way that hides platform-specific details from higher-level code.
+!
+! Version: V1
+!
+! Copyright: © see below
+! */
+!
+! /*
+! * The ICC Software License, Version 0.1
+! *
+! *
+! * Copyright (c) 2003-2006 The International Color Consortium. All rights
+! * reserved.
+! *
+! * Redistribution and use in source and binary forms, with or without
+! * modification, are permitted provided that the following conditions
+! * are met:
+! *
+! * 1. Redistributions of source code must retain the above copyright
+! * notice, this list of conditions and the following disclaimer.
+! *
+! * 2. Redistributions in binary form must reproduce the above copyright
+! * notice, this list of conditions and the following disclaimer in
+! * the documentation and/or other materials provided with the
+! * distribution.
+! *
+! * 3. The end-user documentation included with the redistribution,
+! * if any, must include the following acknowledgment:
+! * "This product includes software developed by the
+! * The International Color Consortium (www.color.org)"
+! * Alternately, this acknowledgment may appear in the software itself,
+! * if and wherever such third-party acknowledgments normally appear.
+! *
+! * 4. The names "ICC" and "The International Color Consortium" must
+! * not be used to imply that the ICC organization endorses or
+! * promotes products derived from this software without prior
+! * written permission. For written permission, please see
+! * <http://www.color.org/>.
+! *
+! *
+! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+! * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+! * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+! * DISCLAIMED. IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
+! * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+! * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+! * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+! * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+! * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+! * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+! * SUCH DAMAGE.
+! * ====================================================================
+! *
+! * This software consists of voluntary contributions made by many
+! * individuals on behalf of the The International Color Consortium.
+! *
+! *
+! * Membership in the ICC is encouraged when this software is used for
+! * commercial purposes.
+! *
+! *
+! * For more information on The International Color Consortium, please
+! * see <http://www.color.org/>.
+! *
+! *
+! */
+!
+! //////////////////////////////////////////////////////////////////////
+! // HISTORY:
+! //
+! // -Initial implementation by Joseph Goldstone sumer 2007
+! //
+! //////////////////////////////////////////////////////////////////////
+!
+! #include "Vetters.h"
+!
+! #include <sstream>
+! using namespace std;
+!
+! #ifndef WIN32
+! #include <sys/errno.h>
+! #else
+! #include <string.h>
+! int strerror_r(int errnum, char *str, int strsize)
+! {
+! const char *errstr = strerror(errnum);
+!
+! if (errstr) {
+! strncpy(str, errstr, strsize);
+! return 0;
+! }
+!
+! return -1;
+! }
+! #define stat _stat
+! #endif
+!
+! #include "ICC_tool_exception.h"
+!
+! const char*
+! path_tail(const char* const s)
+! {
+! const char* tail = strdup(s);
+! const char* last_slash = strrchr(tail, '/');
+! if (last_slash != NULL)
+! tail = last_slash + 1;
+! return tail;
+! }
+!
+! void
+! vet_as_int(const char* const s, const string& name,
+! const string& description)
+! {
+! istringstream ss(s);
+! int i;
+! ss >> i;
+! if (ss.fail())
+! {
+! ostringstream oss;
+! oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
+! << " an integer. It should be an integer representing "
+! << description << ".";
+! throw ICC_tool_exception(oss.str());
+! }
+! }
+!
+! void
+! vet_as_float(const char* const s, const string& name,
+! const string& description)
+! {
+! istringstream ss(s);
+! float i;
+! ss >> i;
+! if (ss.fail())
+! {
+! ostringstream oss;
+! oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
+! << " a floating-point number. It should be a floating-point number"
+! << " representing " << description << ".";
+! throw ICC_tool_exception(oss.str());
+! }
+! }
+!
+! #define STRERROR_BUF_SIZE 256
+! off_t
+! get_size(const char* const s)
+! {
+! struct stat sb;
+! int stat_returned = stat(s, &sb);
+! if (stat_returned < 0)
+! {
+! int stat_errno = errno;
+! char strerror_buf[STRERROR_BUF_SIZE];
+! strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
+! ostringstream oss;
+! oss << "Could not access information for file `" << s << "': "
+! << strerror_buf;
+! throw ICC_tool_exception(oss.str());
+! }
+! return sb.st_size;
+! }
+!
+! bool
+! check_mode(const char* const s, mode_t mode)
+! {
+! struct stat sb;
+! int stat_returned = stat(s, &sb);
+! if (stat_returned < 0)
+! {
+! int stat_errno = errno;
+! char strerror_buf[STRERROR_BUF_SIZE];
+! strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
+! ostringstream oss;
+! oss << "Could not access information for file `" << s << "': "
+! << strerror_buf;
+! throw ICC_tool_exception(oss.str());
+! }
+! return (sb.st_mode & mode) != 0;
+! }
+!
+! bool
+! is_existent_file_pathname(const char* const s)
+! {
+! struct stat sb;
+! return stat(s, &sb) == 0;
+! }
+!
+! bool
+! is_plain_file_pathname(const char* const s)
+! {
+! return check_mode(s, S_IFREG);
+! }
+!
+! bool
+! is_directory(const char* const s)
+! {
+! return check_mode(s, S_IFDIR);
+! }
+!
+! const char* const
+! containing_directory(const char* const s)
+! {
+! if (strlen(s) == 0)
+! throw ICC_tool_exception("name of directory passed to containing_directory"
+! " function was zero-length.");
+! char* tmp = strdup(s);
+! // lop off any trailing seperator
+! if (tmp[strlen(tmp) - 1] == '/')
+! tmp[strlen(tmp) - 1] = 0;
+! if (strlen(tmp) == 0)
+! throw ICC_tool_exception("root directory (which has no containing"
+! " directory) passed to containing_directory"
+! " function");
+! char* idx = strrchr(tmp, '/');
+! if (idx != NULL)
+! {
+! *idx = 0;
+! return tmp;
+! }
+! char* current_directory = getenv("PWD");
+! if (current_directory == NULL)
+! throw ICC_tool_exception("pathname passed to containing_directory has no"
+! " embedded seperator, and there is no value for"
+! " PWD defined in the environment");
+! return strdup(current_directory);
+! }
+!
+! bool
+! is_readable_pathname(const char* const s)
+! {
+! return check_mode(s, S_IRUSR)
+! || check_mode(s, S_IRGRP)
+! || check_mode(s, S_IROTH);
+! }
+!
+! bool
+! is_writable_pathname(const char* const s)
+! {
+! return check_mode(s, S_IWUSR)
+! || check_mode(s, S_IWGRP)
+! || check_mode(s, S_IWOTH);
+! }
+!
+! bool
+! is_pathname_of_empty_file(const char* const s)
+! {
+! return get_size(s) > 0;
+! }
+!
+! void
+! vet_input_file_pathname(const char* const s, const string& name,
+! const string& description)
+! {
+! if (! is_plain_file_pathname(s))
+! {
+! ostringstream oss;
+! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
+! << " of a plain file (i.e. it is the pathname of a directory, or of a"
+! << " symbolic link, or of some other sort of special file.) It should be"
+! << " " << description << ".";
+! throw ICC_tool_exception(oss.str());
+! }
+! if (! is_readable_pathname(s))
+! {
+! ostringstream oss;
+! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
+! << " of a readable file (i.e. you do not have permission to read that"
+! << " file, or you do not have permission to read some directory"
+! << " containing that file.";
+! throw ICC_tool_exception(oss.str());
+! }
+! if (! is_pathname_of_empty_file(s))
+! {
+! ostringstream oss;
+! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
+! << " of an existing readable file, but that file is of zero length."
+! << " The argument should be " << description << ".";
+! throw ICC_tool_exception(oss.str());
+! }
+! }
+!
+! void
+! vet_output_file_pathname(const char* const s, const string& name,
+! const string& description,
+! bool silent_overwrite_OK)
+! {
+! const char* const container = containing_directory(s);
+! if (! is_writable_pathname(container))
+! {
+! ostringstream oss;
+! oss << "The " << name << " argument given, `" << s << "', has a directory"
+! << " component which is not writable."
+! << " The argument should be " << description << ".";
+! throw ICC_tool_exception(oss.str());
+! }
+! if (is_existent_file_pathname(s))
+! {
+! if (is_plain_file_pathname(s))
+! if (is_writable_pathname(s))
+! {
+! if (! silent_overwrite_OK)
+! {
+! ostringstream oss;
+! oss << "The " << name << " argument given, `" << s << "' is of an existing"
+! << " file."
+! << " The argument should be " << description << ".";
+! throw ICC_tool_exception(oss.str());
+! }
+! } else {
+! ostringstream oss;
+! oss << "The " << name << " argument given, `" << s << "' is of an existing"
+! << " file which is not writable."
+! << " The argument should be " << description << ".";
+! throw ICC_tool_exception(oss.str());
+! }
+! }
+! }
+--- 1,325 ----
+! /*
+! File: Vetters.cpp
+!
+! Contains: Utility functions to handle common argument-checking tasks, in a
+! way that hides platform-specific details from higher-level code.
+!
+! Version: V1
+!
+! Copyright: © see below
+! */
+!
+! /*
+! * The ICC Software License, Version 0.1
+! *
+! *
+! * Copyright (c) 2003-2006 The International Color Consortium. All rights
+! * reserved.
+! *
+! * Redistribution and use in source and binary forms, with or without
+! * modification, are permitted provided that the following conditions
+! * are met:
+! *
+! * 1. Redistributions of source code must retain the above copyright
+! * notice, this list of conditions and the following disclaimer.
+! *
+! * 2. Redistributions in binary form must reproduce the above copyright
+! * notice, this list of conditions and the following disclaimer in
+! * the documentation and/or other materials provided with the
+! * distribution.
+! *
+! * 3. The end-user documentation included with the redistribution,
+! * if any, must include the following acknowledgment:
+! * "This product includes software developed by the
+! * The International Color Consortium (www.color.org)"
+! * Alternately, this acknowledgment may appear in the software itself,
+! * if and wherever such third-party acknowledgments normally appear.
+! *
+! * 4. The names "ICC" and "The International Color Consortium" must
+! * not be used to imply that the ICC organization endorses or
+! * promotes products derived from this software without prior
+! * written permission. For written permission, please see
+! * <http://www.color.org/>.
+! *
+! *
+! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+! * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+! * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+! * DISCLAIMED. IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
+! * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+! * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+! * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+! * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+! * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+! * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+! * SUCH DAMAGE.
+! * ====================================================================
+! *
+! * This software consists of voluntary contributions made by many
+! * individuals on behalf of the The International Color Consortium.
+! *
+! *
+! * Membership in the ICC is encouraged when this software is used for
+! * commercial purposes.
+! *
+! *
+! * For more information on The International Color Consortium, please
+! * see <http://www.color.org/>.
+! *
+! *
+! */
+!
+! //////////////////////////////////////////////////////////////////////
+! // HISTORY:
+! //
+! // -Initial implementation by Joseph Goldstone sumer 2007
+! //
+! //////////////////////////////////////////////////////////////////////
+!
+! #include "Vetters.h"
+!
+! #include <sstream>
+! using namespace std;
+!
+! #ifndef WIN32
+! #include <errno.h>
+! #else
+! #include <string.h>
+! #define stat _stat
+! #endif
+!
+! #if defined WIN32 || defined sun
+! int strerror_r(int errnum, char *str, int strsize)
+! {
+! const char *errstr = strerror(errnum);
+!
+! if (errstr) {
+! strncpy(str, errstr, strsize);
+! return 0;
+! }
+!
+! return -1;
+! }
+! #endif
+!
+! #include "ICC_tool_exception.h"
+!
+! const char*
+! path_tail(const char* const s)
+! {
+! const char* tail = strdup(s);
+! const char* last_slash = strrchr(tail, '/');
+! if (last_slash != NULL)
+! tail = last_slash + 1;
+! return tail;
+! }
+!
+! void
+! vet_as_int(const char* const s, const string& name,
+! const string& description)
+! {
+! istringstream ss(s);
+! int i;
+! ss >> i;
+! if (ss.fail())
+! {
+! ostringstream oss;
+! oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
+! << " an integer. It should be an integer representing "
+! << description << ".";
+! throw ICC_tool_exception(oss.str());
+! }
+! }
+!
+! void
+! vet_as_float(const char* const s, const string& name,
+! const string& description)
+! {
+! istringstream ss(s);
+! float i;
+! ss >> i;
+! if (ss.fail())
+! {
+! ostringstream oss;
+! oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
+! << " a floating-point number. It should be a floating-point number"
+! << " representing " << description << ".";
+! throw ICC_tool_exception(oss.str());
+! }
+! }
+!
+! #define STRERROR_BUF_SIZE 256
+! off_t
+! get_size(const char* const s)
+! {
+! struct stat sb;
+! int stat_returned = stat(s, &sb);
+! if (stat_returned < 0)
+! {
+! int stat_errno = errno;
+! char strerror_buf[STRERROR_BUF_SIZE];
+! strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
+! ostringstream oss;
+! oss << "Could not access information for file `" << s << "': "
+! << strerror_buf;
+! throw ICC_tool_exception(oss.str());
+! }
+! return sb.st_size;
+! }
+!
+! bool
+! check_mode(const char* const s, mode_t mode)
+! {
+! struct stat sb;
+! int stat_returned = stat(s, &sb);
+! if (stat_returned < 0)
+! {
+! int stat_errno = errno;
+! char strerror_buf[STRERROR_BUF_SIZE];
+! strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
+! ostringstream oss;
+! oss << "Could not access information for file `" << s << "': "
+! << strerror_buf;
+! throw ICC_tool_exception(oss.str());
+! }
+! return (sb.st_mode & mode) != 0;
+! }
+!
+! bool
+! is_existent_file_pathname(const char* const s)
+! {
+! struct stat sb;
+! return stat(s, &sb) == 0;
+! }
+!
+! bool
+! is_plain_file_pathname(const char* const s)
+! {
+! return check_mode(s, S_IFREG);
+! }
+!
+! bool
+! is_directory(const char* const s)
+! {
+! return check_mode(s, S_IFDIR);
+! }
+!
+! const char* const
+! containing_directory(const char* const s)
+! {
+! if (strlen(s) == 0)
+! throw ICC_tool_exception("name of directory passed to containing_directory"
+! " function was zero-length.");
+! char* tmp = strdup(s);
+! // lop off any trailing seperator
+! if (tmp[strlen(tmp) - 1] == '/')
+! tmp[strlen(tmp) - 1] = 0;
+! if (strlen(tmp) == 0)
+! throw ICC_tool_exception("root directory (which has no containing"
+! " directory) passed to containing_directory"
+! " function");
+! char* idx = strrchr(tmp, '/');
+! if (idx != NULL)
+! {
+! *idx = 0;
+! return tmp;
+! }
+! char* current_directory = getenv("PWD");
+! if (current_directory == NULL)
+! throw ICC_tool_exception("pathname passed to containing_directory has no"
+! " embedded seperator, and there is no value for"
+! " PWD defined in the environment");
+! return strdup(current_directory);
+! }
+!
+! bool
+! is_readable_pathname(const char* const s)
+! {
+! return check_mode(s, S_IRUSR)
+! || check_mode(s, S_IRGRP)
+! || check_mode(s, S_IROTH);
+! }
+!
+! bool
+! is_writable_pathname(const char* const s)
+! {
+! return check_mode(s, S_IWUSR)
+! || check_mode(s, S_IWGRP)
+! || check_mode(s, S_IWOTH);
+! }
+!
+! bool
+! is_pathname_of_empty_file(const char* const s)
+! {
+! return get_size(s) > 0;
+! }
+!
+! void
+! vet_input_file_pathname(const char* const s, const string& name,
+! const string& description)
+! {
+! if (! is_plain_file_pathname(s))
+! {
+! ostringstream oss;
+! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
+! << " of a plain file (i.e. it is the pathname of a directory, or of a"
+! << " symbolic link, or of some other sort of special file.) It should be"
+! << " " << description << ".";
+! throw ICC_tool_exception(oss.str());
+! }
+! if (! is_readable_pathname(s))
+! {
+! ostringstream oss;
+! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
+! << " of a readable file (i.e. you do not have permission to read that"
+! << " file, or you do not have permission to read some directory"
+! << " containing that file.";
+! throw ICC_tool_exception(oss.str());
+! }
+! if (! is_pathname_of_empty_file(s))
+! {
+! ostringstream oss;
+! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
+! << " of an existing readable file, but that file is of zero length."
+! << " The argument should be " << description << ".";
+! throw ICC_tool_exception(oss.str());
+! }
+! }
+!
+! void
+! vet_output_file_pathname(const char* const s, const string& name,
+! const string& description,
+! bool silent_overwrite_OK)
+! {
+! const char* const container = containing_directory(s);
+! if (! is_writable_pathname(container))
+! {
+! ostringstream oss;
+! oss << "The " << name << " argument given, `" << s << "', has a directory"
+! << " component which is not writable."
+! << " The argument should be " << description << ".";
+! throw ICC_tool_exception(oss.str());
+! }
+! if (is_existent_file_pathname(s))
+! {
+! if (is_plain_file_pathname(s))
+! if (is_writable_pathname(s))
+! {
+! if (! silent_overwrite_OK)
+! {
+! ostringstream oss;
+! oss << "The " << name << " argument given, `" << s << "' is of an existing"
+! << " file."
+! << " The argument should be " << description << ".";
+! throw ICC_tool_exception(oss.str());
+! }
+! } else {
+! ostringstream oss;
+! oss << "The " << name << " argument given, `" << s << "' is of an existing"
+! << " file which is not writable."
+! << " The argument should be " << description << ".";
+! throw ICC_tool_exception(oss.str());
+! }
+! }
+! }
+*** misc/SampleICC-1.3.2/IccProfLib/IccIO.cpp Mon Aug 20 22:05:00 2007
+--- misc/build/SampleICC-1.3.2/IccProfLib/IccIO.cpp Fri Jan 25 14:23:09 2008
+***************
+*** 78,84 ****
+ #include "IccIO.h"
+ #include "IccUtil.h"
+ #include <stdlib.h>
+! #include <memory.h>
+ #include <string.h>
+
+ #ifndef __max
+--- 78,84 ----
+ #include "IccIO.h"
+ #include "IccUtil.h"
+ #include <stdlib.h>
+! #include <memory>
+ #include <string.h>
+
+ #ifndef __max
+*** misc/SampleICC-1.3.2/IccProfLib/IccIO.h Mon Aug 20 22:05:00 2007
+--- misc/build/SampleICC-1.3.2/IccProfLib/IccIO.h Fri Jan 25 14:23:09 2008
+***************
+*** 79,84 ****
+--- 79,85 ----
+ #define _ICCIO_H
+
+ #include "IccDefs.h"
++ #include "memory"
+ #include "stdio.h"
+
+ #ifdef USESAMPLEICCNAMESPACE
+*** misc/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp Mon Aug 20 22:05:00 2007
+--- misc/build/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp Fri Jan 25 14:23:09 2008
+***************
+*** 136,152 ****
+ icChar sigBuf[30];
+
+ if (GetBAcsSig())
+! sDescription += "ELEM_bACS\r\n";
+ else
+! sDescription += "ELEM_eACS\r\n";
+
+ icGetSig(sigBuf, m_signature);
+ sDescription += " Signature = ";
+ sDescription += sigBuf;
+! sDescription += "\r\n";
+
+ if (m_pData) {
+! sDescription += "\r\nData Follows:\r\n";
+
+ icMemDump(sDescription, m_pData, m_nDataSize);
+ }
+--- 136,152 ----
+ icChar sigBuf[30];
+
+ if (GetBAcsSig())
+! sDescription += "ELEM_bACS\n";
+ else
+! sDescription += "ELEM_eACS\n";
+
+ icGetSig(sigBuf, m_signature);
+ sDescription += " Signature = ";
+ sDescription += sigBuf;
+! sDescription += "\n";
+
+ if (m_pData) {
+! sDescription += "\nData Follows:\n";
+
+ icMemDump(sDescription, m_pData, m_nDataSize);
+ }
+*** misc/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp Mon Aug 20 22:05:00 2007
+--- misc/build/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp Fri Jan 25 14:23:09 2008
+***************
+*** 218,249 ****
+ sprintf(buf, "%.8f", m_endPoint);
+ sDescription += buf;
+ }
+! sprintf(buf, "]\r\nFunctionType: %04Xh\r\n", m_nFunctionType);
+ sDescription += buf;
+
+ switch(m_nFunctionType) {
+ case 0x0000:
+ if (m_params[1]==0.0 && m_params[2]==0.0)
+! sprintf(buf, "Y = %.8f\r\n\r\n", m_params[3]);
+ else if (m_params[0]==1.0 && m_params[1]==1.0 && m_params[2]==0.0 && m_params[3]==0.0)
+! sprintf(buf, "Y = X\r\n\r\n");
+ else if (m_params[0]==1.0 && m_params[2]==0.0)
+! sprintf(buf, "Y = %.8f * X + %.8f\r\n\r\n",
+ m_params[1], m_params[3]);
+ else
+! sprintf(buf, "Y = (%.8f * X + %.8f)^%.4f + %.8f\r\n\r\n",
+ m_params[1], m_params[2], m_params[0], m_params[3]);
+ sDescription += buf;
+ return;
+
+ case 0x0001:
+! sprintf(buf, "Y = %.8f * log (%.8f * (X ^ %.8f) + %.8f) + %.8f\r\n\r\n",
+ m_params[1], m_params[2], m_params[0], m_params[3], m_params[4]);
+ sDescription += buf;
+ return;
+
+ case 0x0002:
+! sprintf(buf, "Y = %.8f * (%.8f ^ (%.8f * X + %.8f)) + %.8f\r\n\r\n",
+ m_params[0], m_params[1], m_params[2], m_params[3], m_params[4]);
+ sDescription += buf;
+ return;
+--- 218,249 ----
+ sprintf(buf, "%.8f", m_endPoint);
+ sDescription += buf;
+ }
+! sprintf(buf, "]\nFunctionType: %04Xh\n", m_nFunctionType);
+ sDescription += buf;
+
+ switch(m_nFunctionType) {
+ case 0x0000:
+ if (m_params[1]==0.0 && m_params[2]==0.0)
+! sprintf(buf, "Y = %.8f\n\n", m_params[3]);
+ else if (m_params[0]==1.0 && m_params[1]==1.0 && m_params[2]==0.0 && m_params[3]==0.0)
+! sprintf(buf, "Y = X\n\n");
+ else if (m_params[0]==1.0 && m_params[2]==0.0)
+! sprintf(buf, "Y = %.8f * X + %.8f\n\n",
+ m_params[1], m_params[3]);
+ else
+! sprintf(buf, "Y = (%.8f * X + %.8f)^%.4f + %.8f\n\n",
+ m_params[1], m_params[2], m_params[0], m_params[3]);
+ sDescription += buf;
+ return;
+
+ case 0x0001:
+! sprintf(buf, "Y = %.8f * log (%.8f * (X ^ %.8f) + %.8f) + %.8f\n\n",
+ m_params[1], m_params[2], m_params[0], m_params[3], m_params[4]);
+ sDescription += buf;
+ return;
+
+ case 0x0002:
+! sprintf(buf, "Y = %.8f * (%.8f ^ (%.8f * X + %.8f)) + %.8f\n\n",
+ m_params[0], m_params[1], m_params[2], m_params[3], m_params[4]);
+ sDescription += buf;
+ return;
+***************
+*** 250,260 ****
+
+ default:
+ int i;
+! sprintf(buf, "Unknown Function with %d parameters:\r\n\r\n", m_nParameters);
+ sDescription += buf;
+
+ for (i=0; i<m_nParameters; i++) {
+! sprintf(buf, "Param[%d] = %.8lf\r\n\r\n", i, m_params[i]);
+ sDescription += buf;
+ }
+ }
+--- 250,260 ----
+
+ default:
+ int i;
+! sprintf(buf, "Unknown Function with %d parameters:\n\n", m_nParameters);
+ sDescription += buf;
+
+ for (i=0; i<m_nParameters; i++) {
+! sprintf(buf, "Param[%d] = %.8lf\n\n", i, m_params[i]);
+ sDescription += buf;
+ }
+ }
+***************
+*** 496,502 ****
+ if (m_nReserved || m_nReserved2) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " formula curve has non zero reserved data.\r\n";
+ rv = icValidateWarning;
+ }
+
+--- 496,502 ----
+ if (m_nReserved || m_nReserved2) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " formula curve has non zero reserved data.\n";
+ rv = icValidateWarning;
+ }
+
+***************
+*** 505,517 ****
+ if (!m_params || m_nParameters<4) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
+ rv = icValidateCriticalError;
+ }
+ else if (m_nParameters > 4) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
+ rv = icValidateWarning;
+ }
+ break;
+--- 505,517 ----
+ if (!m_params || m_nParameters<4) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
+ rv = icValidateCriticalError;
+ }
+ else if (m_nParameters > 4) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " formula curve has too many formulaCurveSegment parameters.\n";
+ rv = icValidateWarning;
+ }
+ break;
+***************
+*** 520,532 ****
+ if (!m_params || m_nParameters<5) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
+ rv = icValidateCriticalError;
+ }
+ else if (m_nParameters > 5) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
+ rv = icValidateWarning;
+ }
+ break;
+--- 520,532 ----
+ if (!m_params || m_nParameters<5) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
+ rv = icValidateCriticalError;
+ }
+ else if (m_nParameters > 5) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " formula curve has too many formulaCurveSegment parameters.\n";
+ rv = icValidateWarning;
+ }
+ break;
+***************
+*** 535,547 ****
+ if (!m_params || m_nParameters<5) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
+ rv = icValidateCriticalError;
+ }
+ else if (m_nParameters > 5) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
+ rv = icValidateWarning;
+ }
+ break;
+--- 535,547 ----
+ if (!m_params || m_nParameters<5) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
+ rv = icValidateCriticalError;
+ }
+ else if (m_nParameters > 5) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " formula curve has too many formulaCurveSegment parameters.\n";
+ rv = icValidateWarning;
+ }
+ break;
+***************
+*** 551,557 ****
+ icChar buf[128];
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sprintf(buf, " formula curve uses unknown formulaCurveSegment function type %d\r\n", m_nFunctionType);
+ sReport += buf;
+ rv = icValidateCriticalError;
+ }
+--- 551,557 ----
+ icChar buf[128];
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sprintf(buf, " formula curve uses unknown formulaCurveSegment function type %d\n", m_nFunctionType);
+ sReport += buf;
+ rv = icValidateCriticalError;
+ }
+***************
+*** 727,733 ****
+ sDescription += buf;
+ }
+
+! sprintf(buf, "]\r\n");
+ sDescription += buf;
+ }
+ else {
+--- 727,733 ----
+ sDescription += buf;
+ }
+
+! sprintf(buf, "]\n");
+ sDescription += buf;
+ }
+ else {
+***************
+*** 744,752 ****
+ sprintf(buf, "%.8f", m_endPoint);
+ sDescription += buf;
+ }
+! sprintf(buf, "]\r\n");
+ sDescription += buf;
+! sDescription += "IN OUT\r\n";
+
+ icUInt32Number i;
+
+--- 744,752 ----
+ sprintf(buf, "%.8f", m_endPoint);
+ sDescription += buf;
+ }
+! sprintf(buf, "]\n");
+ sDescription += buf;
+! sDescription += "IN OUT\n";
+
+ icUInt32Number i;
+
+***************
+*** 754,764 ****
+ icFloatNumber last = (icFloatNumber)(m_nCount-1);
+
+ for (i=0; i<m_nCount; i++) {
+! sprintf(buf, "%.8f %.8f\r\n", m_startPoint + (icFloatNumber)i*range/last, m_pSamples[i]);
+ sDescription += buf;
+ }
+ }
+! sDescription += "\r\n";
+ }
+
+ /**
+--- 754,764 ----
+ icFloatNumber last = (icFloatNumber)(m_nCount-1);
+
+ for (i=0; i<m_nCount; i++) {
+! sprintf(buf, "%.8f %.8f\n", m_startPoint + (icFloatNumber)i*range/last, m_pSamples[i]);
+ sDescription += buf;
+ }
+ }
+! sDescription += "\n";
+ }
+
+ /**
+***************
+*** 910,916 ****
+ if (m_nReserved) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " sampled curve has non zero reserved data.\r\n";
+ rv = icValidateWarning;
+ }
+
+--- 910,916 ----
+ if (m_nReserved) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " sampled curve has non zero reserved data.\n";
+ rv = icValidateWarning;
+ }
+
+***************
+*** 917,929 ****
+ if (m_nCount<2) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " sampled curve has too few sample points.\r\n";
+ rv = icValidateCriticalError;
+ }
+ else if (m_endPoint-m_startPoint == 0.0) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " sampled curve has a range of zero.\r\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+
+--- 917,929 ----
+ if (m_nCount<2) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " sampled curve has too few sample points.\n";
+ rv = icValidateCriticalError;
+ }
+ else if (m_endPoint-m_startPoint == 0.0) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " sampled curve has a range of zero.\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+
+***************
+*** 1054,1060 ****
+ {
+ CIccCurveSegmentList::iterator i;
+
+! sDescription += "BEGIN_CURVE\r\n";
+ for (i=m_list->begin(); i!=m_list->end(); i++) {
+ (*i)->Describe(sDescription);
+ }
+--- 1054,1060 ----
+ {
+ CIccCurveSegmentList::iterator i;
+
+! sDescription += "BEGIN_CURVE\n";
+ for (i=m_list->begin(); i!=m_list->end(); i++) {
+ (*i)->Describe(sDescription);
+ }
+***************
+*** 1342,1348 ****
+ if (m_nReserved1 || m_nReserved2) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " Segmented curve has non zero reserved data.\r\n";
+ rv = icValidateWarning;
+ }
+
+--- 1342,1348 ----
+ if (m_nReserved1 || m_nReserved2) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " Segmented curve has non zero reserved data.\n";
+ rv = icValidateWarning;
+ }
+
+***************
+*** 1349,1355 ****
+ if (m_list->size()==0) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " Has Empty CurveSegment!\r\n";
+ return icValidateCriticalError;
+ }
+
+--- 1349,1355 ----
+ if (m_list->size()==0) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " Has Empty CurveSegment!\n";
+ return icValidateCriticalError;
+ }
+
+***************
+*** 1599,1609 ****
+ icChar buf[81];
+ int i;
+
+! sprintf(buf, "BEGIN_CURVE_SET %d\r\n", m_nInputChannels);
+ sDescription += buf;
+
+ for (i=0; i<m_nInputChannels; i++) {
+! sprintf(buf, "Curve %d of %d\r\n", i+1, m_nInputChannels);
+ sDescription += buf;
+ if (m_curve[i]) {
+ m_curve[i]->Describe(sDescription);
+--- 1599,1609 ----
+ icChar buf[81];
+ int i;
+
+! sprintf(buf, "BEGIN_CURVE_SET %d\n", m_nInputChannels);
+ sDescription += buf;
+
+ for (i=0; i<m_nInputChannels; i++) {
+! sprintf(buf, "Curve %d of %d\n", i+1, m_nInputChannels);
+ sDescription += buf;
+ if (m_curve[i]) {
+ m_curve[i]->Describe(sDescription);
+***************
+*** 1877,1883 ****
+ sReport += " - Element ";
+ sSigName = Info.GetSigName(GetType());
+ sReport += sSigName;
+! sReport += " Has Empty Curve Element(s)!\r\n";
+ return icValidateCriticalError;
+ }
+
+--- 1877,1883 ----
+ sReport += " - Element ";
+ sSigName = Info.GetSigName(GetType());
+ sReport += sSigName;
+! sReport += " Has Empty Curve Element(s)!\n";
+ return icValidateCriticalError;
+ }
+
+***************
+*** 2042,2048 ****
+ int i, j;
+ icFloatNumber *data = m_pMatrix;
+
+! sprintf(buf, "BEGIN_ELEM_MATRIX %d %d\r\n", m_nInputChannels, m_nOutputChannels);
+ sDescription += buf;
+
+ for (j=0; j<m_nOutputChannels; j++) {
+--- 2042,2048 ----
+ int i, j;
+ icFloatNumber *data = m_pMatrix;
+
+! sprintf(buf, "BEGIN_ELEM_MATRIX %d %d\n", m_nInputChannels, m_nOutputChannels);
+ sDescription += buf;
+
+ for (j=0; j<m_nOutputChannels; j++) {
+***************
+*** 2052,2058 ****
+ sprintf(buf, "%12.8lf", data[i]);
+ sDescription += buf;
+ }
+! sprintf(buf, " + %12.8lf\r\n", m_pConstants[j]);
+ sDescription += buf;
+ data += i;
+ }
+--- 2052,2058 ----
+ sprintf(buf, "%12.8lf", data[i]);
+ sDescription += buf;
+ }
+! sprintf(buf, " + %12.8lf\n", m_pConstants[j]);
+ sDescription += buf;
+ data += i;
+ }
+***************
+*** 2273,2279 ****
+ sReport += " - Element ";
+ sSigName = Info.GetSigName(GetType());
+ sReport += sSigName;
+! sReport += " Has Empty Matrix data!\r\n";
+ return icValidateCriticalError;
+ }
+
+--- 2273,2279 ----
+ sReport += " - Element ";
+ sSigName = Info.GetSigName(GetType());
+ sReport += sSigName;
+! sReport += " Has Empty Matrix data!\n";
+ return icValidateCriticalError;
+ }
+
+***************
+*** 2620,2626 ****
+ sReport += " - Element ";
+ sSigName = Info.GetSigName(GetType());
+ sReport += sSigName;
+! sReport += " Has No CLUT!\r\n";
+ return icValidateCriticalError;
+ }
+
+--- 2620,2626 ----
+ sReport += " - Element ";
+ sSigName = Info.GetSigName(GetType());
+ sReport += sSigName;
+! sReport += " Has No CLUT!\n";
+ return icValidateCriticalError;
+ }
+
+*** misc/SampleICC-1.3.2/IccProfLib/IccProfLibConf.h Mon Aug 20 22:05:00 2007
+--- misc/build/SampleICC-1.3.2/IccProfLib/IccProfLibConf.h Fri Jan 25 14:23:09 2008
+***************
+*** 107,126 ****
+
+ #else // non-PC, perhaps Mac or Linux
+
+! #define ICCUINT64 unsigned long long
+! #define ICCINT64 long long
+! #define ICUINT64TYPE unsigned long long
+! #define ICINT64TYPE long long
+!
+! #if defined(__APPLE__)
+! #if defined(__LITTLE_ENDIAN__)
+! #define ICC_BYTE_ORDER_LITTLE_ENDIAN
+! #else
+! #define ICC_BYTE_ORDER_BIG_ENDIAN
+! #endif
+! #else
+! #define ICC_BYTE_ORDER_LITTLE_ENDIAN
+! #endif
+
+ #define ICCPROFLIB_API
+ #define ICCPROFLIB_EXTERN
+--- 107,129 ----
+
+ #else // non-PC, perhaps Mac or Linux
+
+! #include <sal/types.h>
+! #include <osl/endian.h>
+!
+! #define ICCUINT64 sal_uInt64
+! #define ICCINT64 sal_Int64
+! #define ICUINT64TYPE sal_uInt64
+! #define ICINT64TYPE sal_Int64
+! #define ICINT32TYPE sal_Int32
+! #define ICUINT32TYPE sal_uInt32
+!
+! #if defined(_LITTLE_ENDIAN)
+! # define ICC_BYTE_ORDER_LITTLE_ENDIAN
+! #elif defined(_BIG_ENDIAN)
+! # define ICC_BYTE_ORDER_BIG_ENDIAN
+! #else
+! # error "ENDIAN unknown"
+! #endif
+
+ #define ICCPROFLIB_API
+ #define ICCPROFLIB_EXTERN
+*** misc/SampleICC-1.3.2/IccProfLib/IccProfile.cpp Mon Aug 20 22:05:00 2007
+--- misc/build/SampleICC-1.3.2/IccProfLib/IccProfile.cpp Fri Jan 25 14:23:09 2008
+***************
+*** 567,573 ****
+
+ if (!ReadBasic(pIO)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += " - Unable to read profile!**\r\n\tProfile has invalid structure!\r\n";
+ Cleanup();
+
+ return icValidateCriticalError;
+--- 567,573 ----
+
+ if (!ReadBasic(pIO)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += " - Unable to read profile!**\n\tProfile has invalid structure!\n";
+ Cleanup();
+
+ return icValidateCriticalError;
+***************
+*** 576,582 ****
+ // Check profile header
+ if (!CheckFileSize(pIO)) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += "Bad Header File Size\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+--- 576,582 ----
+ // Check profile header
+ if (!CheckFileSize(pIO)) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += "Bad Header File Size\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+***************
+*** 588,594 ****
+ CalcProfileID(pIO, &profileID);
+ if (strncmp((char*)profileID.ID8, (char*)m_Header.profileID.ID8, 16) != 0) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += "Bad Profile ID\r\n";
+
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+--- 588,594 ----
+ CalcProfileID(pIO, &profileID);
+ if (strncmp((char*)profileID.ID8, (char*)m_Header.profileID.ID8, 16) != 0) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += "Bad Profile ID\n";
+
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+***************
+*** 601,607 ****
+ sReport += icValidateCriticalErrorMsg;
+ sReport += " - ";
+ sReport += Info.GetTagSigName(i->TagInfo.sig);
+! sReport += " - Tag has invalid structure!\r\n";
+
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+--- 601,607 ----
+ sReport += icValidateCriticalErrorMsg;
+ sReport += " - ";
+ sReport += Info.GetTagSigName(i->TagInfo.sig);
+! sReport += " - Tag has invalid structure!\n";
+
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+***************
+*** 1026,1032 ****
+
+ default:
+ sReport += icValidateCriticalErrorMsg;
+! sprintf(buf, " - %s: Unknown profile class!\r\n", Info.GetProfileClassSigName(m_Header.deviceClass));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+--- 1026,1032 ----
+
+ default:
+ sReport += icValidateCriticalErrorMsg;
+! sprintf(buf, " - %s: Unknown profile class!\n", Info.GetProfileClassSigName(m_Header.deviceClass));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+***************
+*** 1033,1039 ****
+
+ if (!Info.IsValidSpace(m_Header.colorSpace)) {
+ sReport += icValidateCriticalErrorMsg;
+! sprintf(buf, " - %s: Unknown color space!\r\n", Info.GetColorSpaceSigName(m_Header.colorSpace));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+--- 1033,1039 ----
+
+ if (!Info.IsValidSpace(m_Header.colorSpace)) {
+ sReport += icValidateCriticalErrorMsg;
+! sprintf(buf, " - %s: Unknown color space!\n", Info.GetColorSpaceSigName(m_Header.colorSpace));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+***************
+*** 1041,1047 ****
+ if (m_Header.deviceClass==icSigLinkClass) {
+ if (!Info.IsValidSpace(m_Header.pcs)) {
+ sReport += icValidateCriticalErrorMsg;
+! sprintf(buf, " - %s: Unknown pcs color space!\r\n", Info.GetColorSpaceSigName(m_Header.pcs));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+--- 1041,1047 ----
+ if (m_Header.deviceClass==icSigLinkClass) {
+ if (!Info.IsValidSpace(m_Header.pcs)) {
+ sReport += icValidateCriticalErrorMsg;
+! sprintf(buf, " - %s: Unknown pcs color space!\n", Info.GetColorSpaceSigName(m_Header.pcs));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+***************
+*** 1049,1055 ****
+ else {
+ if (m_Header.pcs!=icSigXYZData && m_Header.pcs!=icSigLabData) {
+ sReport += icValidateCriticalErrorMsg;
+! sprintf(buf, " - %s: Invalid pcs color space!\r\n", Info.GetColorSpaceSigName(m_Header.pcs));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+--- 1049,1055 ----
+ else {
+ if (m_Header.pcs!=icSigXYZData && m_Header.pcs!=icSigLabData) {
+ sReport += icValidateCriticalErrorMsg;
+! sprintf(buf, " - %s: Invalid pcs color space!\n", Info.GetColorSpaceSigName(m_Header.pcs));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+***************
+*** 1068,1074 ****
+
+ default:
+ sReport += icValidateWarningMsg;
+! sprintf(buf, " - %s: Unknown platform signature.\r\n", Info.GetPlatformSigName(m_Header.platform));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+--- 1068,1074 ----
+
+ default:
+ sReport += icValidateWarningMsg;
+! sprintf(buf, " - %s: Unknown platform signature.\n", Info.GetPlatformSigName(m_Header.platform));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+***************
+*** 1095,1101 ****
+
+ default:
+ sReport += icValidateWarningMsg;
+! sprintf(buf, " - %s: Unregisterd CMM signature.\r\n", Info.GetCmmSigName((icCmmSignature)m_Header.cmmId));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+--- 1095,1101 ----
+
+ default:
+ sReport += icValidateWarningMsg;
+! sprintf(buf, " - %s: Unregisterd CMM signature.\n", Info.GetCmmSigName((icCmmSignature)m_Header.cmmId));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+***************
+*** 1109,1115 ****
+
+ default:
+ sReport += icValidateCriticalErrorMsg;
+! sprintf(buf, " - %s: Unknown rendering intent!\r\n", Info.GetRenderingIntentName((icRenderingIntent)m_Header.renderingIntent));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+--- 1109,1115 ----
+
+ default:
+ sReport += icValidateCriticalErrorMsg;
+! sprintf(buf, " - %s: Unknown rendering intent!\n", Info.GetRenderingIntentName((icRenderingIntent)m_Header.renderingIntent));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+***************
+*** 1120,1126 ****
+ icFloatNumber Z = icFtoD(m_Header.illuminant.Z);
+ if (X<0.9640 || X>0.9644 || Y!=1.0 || Z<0.8247 || Z>0.8251) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += " - Non D50 Illuminant XYZ values.\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+--- 1120,1126 ----
+ icFloatNumber Z = icFtoD(m_Header.illuminant.Z);
+ if (X<0.9640 || X>0.9644 || Y!=1.0 || Z<0.8247 || Z>0.8251) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += " - Non D50 Illuminant XYZ values.\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+***************
+*** 1130,1136 ****
+ }
+ if (sum) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += " - Reserved value must be zero.\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+--- 1130,1136 ----
+ }
+ if (sum) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += " - Reserved value must be zero.\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+***************
+*** 1163,1169 ****
+ {
+ sReport += icValidateWarningMsg;
+ sReport += buf;
+! sReport += " - Tag exclusion test failed.\r\n";
+ rv = false;
+ }
+ }
+--- 1163,1169 ----
+ {
+ sReport += icValidateWarningMsg;
+ sReport += buf;
+! sReport += " - Tag exclusion test failed.\n";
+ rv = false;
+ }
+ }
+***************
+*** 1177,1183 ****
+ {
+ sReport += icValidateWarningMsg;
+ sReport += buf;
+! sReport += " - Tag exclusion test failed.\r\n";
+ rv = false;
+ }
+ break;
+--- 1177,1183 ----
+ {
+ sReport += icValidateWarningMsg;
+ sReport += buf;
+! sReport += " - Tag exclusion test failed.\n";
+ rv = false;
+ }
+ break;
+***************
+*** 1192,1198 ****
+ {
+ sReport += icValidateWarningMsg;
+ sReport += buf;
+! sReport += " - Tag exclusion test failed.\r\n";
+ rv = false;
+ }
+ break;
+--- 1192,1198 ----
+ {
+ sReport += icValidateWarningMsg;
+ sReport += buf;
+! sReport += " - Tag exclusion test failed.\n";
+ rv = false;
+ }
+ break;
+***************
+*** 1234,1240 ****
+ if (!IsTypeValid(tagsig, typesig)) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += buf;
+! sprintf(buf," - %s: Invalid tag type (Might be critical!).\r\n", Info.GetTagTypeSigName(typesig));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+--- 1234,1240 ----
+ if (!IsTypeValid(tagsig, typesig)) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += buf;
+! sprintf(buf," - %s: Invalid tag type (Might be critical!).\n", Info.GetTagTypeSigName(typesig));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+***************
+*** 1477,1483 ****
+ {
+ if (m_Tags->size() <= 0) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "No tags present.\r\n";
+ return icValidateCriticalError;
+ }
+
+--- 1477,1483 ----
+ {
+ if (m_Tags->size() <= 0) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "No tags present.\n";
+ return icValidateCriticalError;
+ }
+
+***************
+*** 1486,1492 ****
+ if (!GetTag(icSigProfileDescriptionTag) ||
+ !GetTag(icSigCopyrightTag)) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += "Required tags missing.\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+--- 1486,1492 ----
+ if (!GetTag(icSigProfileDescriptionTag) ||
+ !GetTag(icSigCopyrightTag)) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += "Required tags missing.\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+***************
+*** 1495,1501 ****
+ if (sig != icSigLinkClass) {
+ if (!GetTag(icSigMediaWhitePointTag)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Media white point tag missing.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+--- 1495,1501 ----
+ if (sig != icSigLinkClass) {
+ if (!GetTag(icSigMediaWhitePointTag)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Media white point tag missing.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+***************
+*** 1505,1511 ****
+ if (m_Header.colorSpace == icSigGrayData) {
+ if (!GetTag(icSigGrayTRCTag)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Gray TRC tag missing.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+--- 1505,1511 ----
+ if (m_Header.colorSpace == icSigGrayData) {
+ if (!GetTag(icSigGrayTRCTag)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Gray TRC tag missing.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+***************
+*** 1515,1521 ****
+ !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
+ !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Critical tag(s) missing.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+--- 1515,1521 ----
+ !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
+ !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Critical tag(s) missing.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+***************
+*** 1526,1532 ****
+ if (m_Header.colorSpace == icSigGrayData) {
+ if (!GetTag(icSigGrayTRCTag)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Gray TRC tag missing.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+--- 1526,1532 ----
+ if (m_Header.colorSpace == icSigGrayData) {
+ if (!GetTag(icSigGrayTRCTag)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Gray TRC tag missing.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+***************
+*** 1536,1542 ****
+ !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
+ !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Critical tag(s) missing.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+--- 1536,1542 ----
+ !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
+ !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Critical tag(s) missing.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+***************
+*** 1547,1553 ****
+ if (m_Header.colorSpace == icSigGrayData) {
+ if (!GetTag(icSigGrayTRCTag)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Gray TRC tag missing.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+--- 1547,1553 ----
+ if (m_Header.colorSpace == icSigGrayData) {
+ if (!GetTag(icSigGrayTRCTag)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Gray TRC tag missing.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+***************
+*** 1556,1568 ****
+ !GetTag(icSigAToB1Tag) || !GetTag(icSigBToA1Tag) ||
+ !GetTag(icSigAToB2Tag) || !GetTag(icSigBToA2Tag)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Critical tag(s) missing.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+ if (!GetTag(icSigGamutTag)) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += "Gamut tag missing.\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+--- 1556,1568 ----
+ !GetTag(icSigAToB1Tag) || !GetTag(icSigBToA1Tag) ||
+ !GetTag(icSigAToB2Tag) || !GetTag(icSigBToA2Tag)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Critical tag(s) missing.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+ if (!GetTag(icSigGamutTag)) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += "Gamut tag missing.\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+***************
+*** 1585,1591 ****
+ case icSig16colorData:
+ if (!GetTag(icSigColorantTableTag)) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += "xCLR output profile is missing colorantTableTag\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+--- 1585,1591 ----
+ case icSig16colorData:
+ if (!GetTag(icSigColorantTableTag)) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += "xCLR output profile is missing colorantTableTag\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+***************
+*** 1599,1605 ****
+ case icSigLinkClass:
+ if (!GetTag(icSigAToB0Tag) || !GetTag(icSigProfileSequenceDescTag)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Critical tag(s) missing.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+--- 1599,1605 ----
+ case icSigLinkClass:
+ if (!GetTag(icSigAToB0Tag) || !GetTag(icSigProfileSequenceDescTag)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Critical tag(s) missing.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+***************
+*** 1606,1612 ****
+ if (icIsSpaceCLR(m_Header.colorSpace)) {
+ if (!GetTag(icSigColorantTableTag)) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += "Required tag(s) missing.\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+ }
+--- 1606,1612 ----
+ if (icIsSpaceCLR(m_Header.colorSpace)) {
+ if (!GetTag(icSigColorantTableTag)) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += "Required tag(s) missing.\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+ }
+***************
+*** 1614,1620 ****
+ if (icIsSpaceCLR(m_Header.pcs)) {
+ if (!GetTag(icSigColorantTableOutTag)) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += "Required tag(s) missing.\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+ }
+--- 1614,1620 ----
+ if (icIsSpaceCLR(m_Header.pcs)) {
+ if (!GetTag(icSigColorantTableOutTag)) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += "Required tag(s) missing.\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+ }
+***************
+*** 1623,1629 ****
+ case icSigColorSpaceClass:
+ if (!GetTag(icSigAToB0Tag) || !GetTag(icSigBToA0Tag)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Critical tag(s) missing.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ break;
+--- 1623,1629 ----
+ case icSigColorSpaceClass:
+ if (!GetTag(icSigAToB0Tag) || !GetTag(icSigBToA0Tag)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Critical tag(s) missing.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ break;
+***************
+*** 1631,1637 ****
+ case icSigAbstractClass:
+ if (!GetTag(icSigAToB0Tag)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Critical tag(s) missing.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ break;
+--- 1631,1637 ----
+ case icSigAbstractClass:
+ if (!GetTag(icSigAToB0Tag)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Critical tag(s) missing.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ break;
+***************
+*** 1639,1645 ****
+ case icSigNamedColorClass:
+ if (!GetTag(icSigNamedColor2Tag)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Critical tag(s) missing.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+--- 1639,1645 ----
+ case icSigNamedColorClass:
+ if (!GetTag(icSigNamedColor2Tag)) {
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Critical tag(s) missing.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+***************
+*** 1647,1653 ****
+
+ default:
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Unknown Profile Class.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ break;
+ }
+--- 1647,1653 ----
+
+ default:
+ sReport += icValidateCriticalErrorMsg;
+! sReport += "Unknown Profile Class.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ break;
+ }
+***************
+*** 1724,1730 ****
+ // Check for duplicate tags
+ if (!AreTagsUnique()) {
+ sReport += icValidateWarning;
+! sReport += " - There are duplicate tags.\r\n";
+ rv =icMaxStatus(rv, icValidateWarning);
+ }
+
+--- 1724,1730 ----
+ // Check for duplicate tags
+ if (!AreTagsUnique()) {
+ sReport += icValidateWarning;
+! sReport += " - There are duplicate tags.\n";
+ rv =icMaxStatus(rv, icValidateWarning);
+ }
+
+***************
+*** 1979,1985 ****
+ sReport = icValidateCriticalErrorMsg;
+ sReport += " - ";
+ sReport += szFilename;
+! sReport += "- Invalid Filename\r\n";
+ delete pFileIO;
+ return NULL;
+ }
+--- 1979,1985 ----
+ sReport = icValidateCriticalErrorMsg;
+ sReport += " - ";
+ sReport += szFilename;
+! sReport += "- Invalid Filename\n";
+ delete pFileIO;
+ return NULL;
+ }
+*** misc/SampleICC-1.3.2/IccProfLib/IccTagBasic.cpp Mon Aug 20 22:05:00 2007
+--- misc/build/SampleICC-1.3.2/IccProfLib/IccTagBasic.cpp Fri Jan 25 14:23:09 2008
+***************
+*** 166,172 ****
+ CIccInfo Info;
+ sReport += icValidateNonCompliantMsg;
+ sReport += Info.GetSigName(sig);
+! sReport += " - Reserved Value must be zero.\r\n";
+
+ rv = icValidateNonCompliant;
+ }
+--- 166,172 ----
+ CIccInfo Info;
+ sReport += icValidateNonCompliantMsg;
+ sReport += Info.GetSigName(sig);
+! sReport += " - Reserved Value must be zero.\n";
+
+ rv = icValidateNonCompliant;
+ }
+***************
+*** 340,346 ****
+ sprintf(buf, "%u Bytes.", m_nSize-4);
+ sDescription += buf;
+
+! sDescription += "\r\n\r\nData Follows:\r\n";
+
+ icMemDump(sDescription, m_pData+4, m_nSize-4);
+ }
+--- 340,346 ----
+ sprintf(buf, "%u Bytes.", m_nSize-4);
+ sDescription += buf;
+
+! sDescription += "\n\nData Follows:\n";
+
+ icMemDump(sDescription, m_pData+4, m_nSize-4);
+ }
+***************
+*** 511,517 ****
+ if (m_szText && *m_szText)
+ sDescription += m_szText;
+
+! sDescription += "\"\r\n";
+ }
+
+
+--- 511,517 ----
+ if (m_szText && *m_szText)
+ sDescription += m_szText;
+
+! sDescription += "\"\n";
+ }
+
+
+***************
+*** 629,635 ****
+ if (m_nBufSize<7) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Tag must have at least seven text characters.\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+ break;
+--- 629,635 ----
+ if (m_nBufSize<7) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Tag must have at least seven text characters.\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+ break;
+***************
+*** 636,642 ****
+ default:
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Unknown Tag.\r\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+ int i;
+--- 636,642 ----
+ default:
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Unknown Tag.\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+ int i;
+***************
+*** 644,650 ****
+ if (m_szText[i]&0x80) {
+ sReport += icValidateWarning;
+ sReport += sSigName;
+! sReport += " - Text do not contain 7bit data.\r\n";
+ }
+ }
+ }
+--- 644,650 ----
+ if (m_szText[i]&0x80) {
+ sReport += icValidateWarning;
+ sReport += sSigName;
+! sReport += " - Text do not contain 7bit data.\n";
+ }
+ }
+ }
+***************
+*** 651,657 ****
+ else {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Empty Tag.\r\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+
+--- 651,657 ----
+ else {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Empty Tag.\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+
+***************
+*** 941,947 ****
+ if (m_szText && *m_szText)
+ sDescription += m_szText;
+
+! sDescription += "\"\r\n";
+ }
+
+
+--- 941,947 ----
+ if (m_szText && *m_szText)
+ sDescription += m_szText;
+
+! sDescription += "\"\n";
+ }
+
+
+***************
+*** 1101,1107 ****
+ if (m_nScriptSize>67) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - ScriptCode count must not be greater than 67.\r\n";
+
+ rv =icMaxStatus(rv, icValidateNonCompliant);
+ }
+--- 1101,1107 ----
+ if (m_nScriptSize>67) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - ScriptCode count must not be greater than 67.\n";
+
+ rv =icMaxStatus(rv, icValidateNonCompliant);
+ }
+***************
+*** 1260,1266 ****
+ CIccInfo Fmt;
+
+ sDescription += Fmt.GetSigName(m_nSig);
+! sDescription += "\r\n";
+ }
+
+
+--- 1260,1266 ----
+ CIccInfo Fmt;
+
+ sDescription += Fmt.GetSigName(m_nSig);
+! sDescription += "\n";
+ }
+
+
+***************
+*** 1320,1326 ****
+ {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sprintf(buf, " - %s: Unknown Technology.\r\n", Info.GetSigName(m_nSig));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+--- 1320,1326 ----
+ {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sprintf(buf, " - %s: Unknown Technology.\n", Info.GetSigName(m_nSig));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+***************
+*** 1336,1342 ****
+ {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sprintf(buf, " - %s: Unknown Reference Medium Gamut.\r\n", Info.GetSigName(m_nSig));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+--- 1336,1342 ----
+ {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sprintf(buf, " - %s: Unknown Reference Medium Gamut.\n", Info.GetSigName(m_nSig));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+***************
+*** 1355,1361 ****
+ {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sprintf(buf, " - %s: Unknown Colorimetric Intent Image State.\r\n", Info.GetSigName(m_nSig));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+--- 1355,1361 ----
+ {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sprintf(buf, " - %s: Unknown Colorimetric Intent Image State.\n", Info.GetSigName(m_nSig));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+***************
+*** 1686,1692 ****
+
+ sDescription.reserve(sDescription.size() + m_nSize*79);
+
+! sprintf(buf, "BEGIN_NAMED_COLORS flags=%08x %u %u\r\n", m_nVendorFlags, m_nSize, m_nDeviceCoords);
+ sDescription += buf;
+
+ for (i=0; i<m_nSize; i++) {
+--- 1686,1692 ----
+
+ sDescription.reserve(sDescription.size() + m_nSize*79);
+
+! sprintf(buf, "BEGIN_NAMED_COLORS flags=%08x %u %u\n", m_nVendorFlags, m_nSize, m_nDeviceCoords);
+ sDescription += buf;
+
+ for (i=0; i<m_nSize; i++) {
+***************
+*** 1717,1723 ****
+ sDescription += buf;
+ }
+ }
+! sDescription += "\r\n";
+
+ pNamedColor = (SIccNamedColorEntry*)((icChar*)pNamedColor + m_nColorEntrySize);
+ }
+--- 1717,1723 ----
+ sDescription += buf;
+ }
+ }
+! sDescription += "\n";
+
+ pNamedColor = (SIccNamedColorEntry*)((icChar*)pNamedColor + m_nColorEntrySize);
+ }
+***************
+*** 2082,2088 ****
+ if (!m_nSize) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Empty tag!\r\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+
+--- 2082,2088 ----
+ if (!m_nSize) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Empty tag!\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+
+***************
+*** 2092,2098 ****
+ if (m_nDeviceCoords != nCoords) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of device co-ordinates.\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+ }
+--- 2092,2098 ----
+ if (m_nDeviceCoords != nCoords) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of device co-ordinates.\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+ }
+***************
+*** 2099,2105 ****
+ else {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+ }
+--- 2099,2105 ----
+ else {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+ }
+***************
+*** 2285,2291 ****
+ icChar buf[128];
+
+ if (m_nSize == 1 ) {
+! sprintf(buf, "X=%.4lf, Y=%.4lf, Z=%.4lf\r\n", icFtoD(m_XYZ[0].X), icFtoD(m_XYZ[0].Y), icFtoD(m_XYZ[0].Z));
+ sDescription += buf;
+ }
+ else {
+--- 2285,2291 ----
+ icChar buf[128];
+
+ if (m_nSize == 1 ) {
+! sprintf(buf, "X=%.4lf, Y=%.4lf, Z=%.4lf\n", icFtoD(m_XYZ[0].X), icFtoD(m_XYZ[0].Y), icFtoD(m_XYZ[0].Z));
+ sDescription += buf;
+ }
+ else {
+***************
+*** 2293,2299 ****
+ sDescription.reserve(sDescription.size() + m_nSize*79);
+
+ for (i=0; i<m_nSize; i++) {
+! sprintf(buf, "value[%u]: X=%.4lf, Y=%.4lf, Z=%.4lf\r\n", i, icFtoD(m_XYZ[i].X), icFtoD(m_XYZ[i].Y), icFtoD(m_XYZ[i].Z));
+ sDescription += buf;
+ }
+ }
+--- 2293,2299 ----
+ sDescription.reserve(sDescription.size() + m_nSize*79);
+
+ for (i=0; i<m_nSize; i++) {
+! sprintf(buf, "value[%u]: X=%.4lf, Y=%.4lf, Z=%.4lf\n", i, icFtoD(m_XYZ[i].X), icFtoD(m_XYZ[i].Y), icFtoD(m_XYZ[i].Z));
+ sDescription += buf;
+ }
+ }
+***************
+*** 2347,2353 ****
+ if (!m_nSize) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Empty tag.\r\n";
+
+ rv = icMaxStatus(rv, icValidateWarning);
+ return rv;
+--- 2347,2353 ----
+ if (!m_nSize) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Empty tag.\n";
+
+ rv = icMaxStatus(rv, icValidateWarning);
+ return rv;
+***************
+*** 2553,2566 ****
+
+ icUInt32Number i;
+ //sDescription.reserve(sDescription.size() + m_nChannels*79);
+! sprintf(buf, "Number of Channels : %u\r\n", m_nChannels);
+ sDescription += buf;
+
+! sprintf(buf, "Colorant Encoding : %s\r\n", Fmt.GetColorantEncoding((icColorantEncoding)m_nColorantType));
+ sDescription += buf;
+
+ for (i=0; i<m_nChannels; i++) {
+! sprintf(buf, "value[%u]: x=%.3lf, y=%.3lf\r\n", i, icUFtoD(m_xy[i].x), icUFtoD(m_xy[i].y));
+ sDescription += buf;
+ }
+
+--- 2553,2566 ----
+
+ icUInt32Number i;
+ //sDescription.reserve(sDescription.size() + m_nChannels*79);
+! sprintf(buf, "Number of Channels : %u\n", m_nChannels);
+ sDescription += buf;
+
+! sprintf(buf, "Colorant Encoding : %s\n", Fmt.GetColorantEncoding((icColorantEncoding)m_nColorantType));
+ sDescription += buf;
+
+ for (i=0; i<m_nChannels; i++) {
+! sprintf(buf, "value[%u]: x=%.3lf, y=%.3lf\n", i, icUFtoD(m_xy[i].x), icUFtoD(m_xy[i].y));
+ sDescription += buf;
+ }
+
+***************
+*** 2617,2623 ****
+ if (m_nChannels!=3) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Number of device channels must be three.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+--- 2617,2623 ----
+ if (m_nChannels!=3) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Number of device channels must be three.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+***************
+*** 2629,2635 ****
+ (m_xy[2].x != icDtoUF((icFloatNumber)0.150)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.060)) ) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Chromaticity data does not match specification.\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+ break;
+--- 2629,2635 ----
+ (m_xy[2].x != icDtoUF((icFloatNumber)0.150)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.060)) ) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Chromaticity data does not match specification.\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+ break;
+***************
+*** 2642,2648 ****
+ (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Chromaticity data does not match specification.\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+ break;
+--- 2642,2648 ----
+ (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Chromaticity data does not match specification.\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+ break;
+***************
+*** 2655,2661 ****
+ (m_xy[2].x != icDtoUF((icFloatNumber)0.15)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.06)) ) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Chromaticity data does not match specification.\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+ break;
+--- 2655,2661 ----
+ (m_xy[2].x != icDtoUF((icFloatNumber)0.15)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.06)) ) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Chromaticity data does not match specification.\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+ break;
+***************
+*** 2668,2674 ****
+ (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Chromaticity data does not match specification.\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+ break;
+--- 2668,2674 ----
+ (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Chromaticity data does not match specification.\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+ break;
+***************
+*** 2678,2684 ****
+ {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Invalid colorant type encoding.\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+ }
+--- 2678,2684 ----
+ {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Invalid colorant type encoding.\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+ }
+***************
+*** 2884,2892 ****
+
+ if (m_nSize == 1 ) {
+ if (Tsig==icSigS15Fixed16ArrayType)
+! sprintf(buf, "Value = %.4lf\r\n", icFtoD(m_Num[0]));
+ else
+! sprintf(buf, "Value = %.4lf\r\n", icUFtoD(m_Num[0]));
+ sDescription += buf;
+ }
+ else {
+--- 2884,2892 ----
+
+ if (m_nSize == 1 ) {
+ if (Tsig==icSigS15Fixed16ArrayType)
+! sprintf(buf, "Value = %.4lf\n", icFtoD(m_Num[0]));
+ else
+! sprintf(buf, "Value = %.4lf\n", icUFtoD(m_Num[0]));
+ sDescription += buf;
+ }
+ else {
+***************
+*** 2893,2910 ****
+ icUInt32Number i;
+
+ if (Tsig==icSigS15Fixed16ArrayType && m_nSize==9) {
+! sDescription += "Matrix Form:\r\n";
+ icMatrixDump(sDescription, (icS15Fixed16Number*)m_Num);
+
+! sDescription += "\r\nArrayForm:\r\n";
+ }
+ sDescription.reserve(sDescription.size() + m_nSize*79);
+
+ for (i=0; i<m_nSize; i++) {
+ if (Tsig==icSigS15Fixed16ArrayType)
+! sprintf(buf, "Value[%u] = %.4lf\r\n", i, icFtoD(m_Num[i]));
+ else
+! sprintf(buf, "Value[%u] = %.4lf\r\n", i, icUFtoD(m_Num[i]));
+ sDescription += buf;
+ }
+ }
+--- 2893,2910 ----
+ icUInt32Number i;
+
+ if (Tsig==icSigS15Fixed16ArrayType && m_nSize==9) {
+! sDescription += "Matrix Form:\n";
+ icMatrixDump(sDescription, (icS15Fixed16Number*)m_Num);
+
+! sDescription += "\nArrayForm:\n";
+ }
+ sDescription.reserve(sDescription.size() + m_nSize*79);
+
+ for (i=0; i<m_nSize; i++) {
+ if (Tsig==icSigS15Fixed16ArrayType)
+! sprintf(buf, "Value[%u] = %.4lf\n", i, icFtoD(m_Num[i]));
+ else
+! sprintf(buf, "Value[%u] = %.4lf\n", i, icUFtoD(m_Num[i]));
+ sDescription += buf;
+ }
+ }
+***************
+*** 3172,3178 ****
+ icChar buf[128];
+
+ if (m_nSize == 1 ) {
+! sprintf(buf, "Value = %u (0x%x)\r\n", m_Num[0], m_Num[0]);
+ sDescription += buf;
+ }
+ else {
+--- 3172,3178 ----
+ icChar buf[128];
+
+ if (m_nSize == 1 ) {
+! sprintf(buf, "Value = %u (0x%x)\n", m_Num[0], m_Num[0]);
+ sDescription += buf;
+ }
+ else {
+***************
+*** 3180,3186 ****
+ sDescription.reserve(sDescription.size() + m_nSize*79);
+
+ for (i=0; i<m_nSize; i++) {
+! sprintf(buf, "Value[%u] = %u (0x%x)\r\n", i, m_Num[i], m_Num[i]);
+ sDescription += buf;
+ }
+ }
+--- 3180,3186 ----
+ sDescription.reserve(sDescription.size() + m_nSize*79);
+
+ for (i=0; i<m_nSize; i++) {
+! sprintf(buf, "Value[%u] = %u (0x%x)\n", i, m_Num[i], m_Num[i]);
+ sDescription += buf;
+ }
+ }
+***************
+*** 3374,3388 ****
+ CIccInfo Fmt;
+ icChar buf[128];
+
+! sDescription += Fmt.GetStandardObserverName(m_Data.stdObserver); sDescription += "\r\n";
+! sprintf(buf, "Backing measurement: X=%.4lf, Y=%.4lf, Z=%.4lf\r\n",
+ icFtoD(m_Data.backing.X),
+ icFtoD(m_Data.backing.Y),
+ icFtoD(m_Data.backing.Z));
+ sDescription += buf;
+! sDescription += Fmt.GetMeasurementGeometryName(m_Data.geometry); sDescription += "\r\n";
+! sDescription += Fmt.GetMeasurementFlareName(m_Data.flare); sDescription += "\r\n";
+! sDescription += Fmt.GetIlluminantName(m_Data.illuminant); sDescription += "\r\n";
+ }
+
+
+--- 3374,3388 ----
+ CIccInfo Fmt;
+ icChar buf[128];
+
+! sDescription += Fmt.GetStandardObserverName(m_Data.stdObserver); sDescription += "\n";
+! sprintf(buf, "Backing measurement: X=%.4lf, Y=%.4lf, Z=%.4lf\n",
+ icFtoD(m_Data.backing.X),
+ icFtoD(m_Data.backing.Y),
+ icFtoD(m_Data.backing.Z));
+ sDescription += buf;
+! sDescription += Fmt.GetMeasurementGeometryName(m_Data.geometry); sDescription += "\n";
+! sDescription += Fmt.GetMeasurementFlareName(m_Data.flare); sDescription += "\n";
+! sDescription += Fmt.GetIlluminantName(m_Data.illuminant); sDescription += "\n";
+ }
+
+
+***************
+*** 3416,3422 ****
+ default:
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Invalid standard observer encoding.\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+--- 3416,3422 ----
+ default:
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Invalid standard observer encoding.\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+***************
+*** 3429,3435 ****
+ default:
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Invalid measurement geometry encoding.\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+--- 3429,3435 ----
+ default:
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Invalid measurement geometry encoding.\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+***************
+*** 3448,3454 ****
+ default:
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Invalid standard illuminant encoding.\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+--- 3448,3454 ----
+ default:
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Invalid standard illuminant encoding.\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+***************
+*** 3902,3910 ****
+
+ for (i=m_Strings->begin(); i!=m_Strings->end(); i++) {
+ if (i!=m_Strings->begin())
+! sDescription += "\r\n";
+
+! sprintf(szBuf, "Language = '%c%c', Region = '%c%c'\r\n",
+ i->m_nLanguageCode>>8, i->m_nLanguageCode,
+ i->m_nCountryCode>>8, i->m_nCountryCode);
+
+--- 3902,3910 ----
+
+ for (i=m_Strings->begin(); i!=m_Strings->end(); i++) {
+ if (i!=m_Strings->begin())
+! sDescription += "\n";
+
+! sprintf(szBuf, "Language = '%c%c', Region = '%c%c'\n",
+ i->m_nLanguageCode>>8, i->m_nLanguageCode,
+ i->m_nCountryCode>>8, i->m_nCountryCode);
+
+***************
+*** 3919,3925 ****
+ i->GetAnsi(szBuf, nSize);
+ sDescription += "\"";
+ sDescription += szBuf;
+! sDescription += "\"\r\n";
+ }
+ }
+
+--- 3919,3925 ----
+ i->GetAnsi(szBuf, nSize);
+ sDescription += "\"";
+ sDescription += szBuf;
+! sDescription += "\"\n";
+ }
+ }
+
+***************
+*** 3948,3954 ****
+ if (!m_Strings->size()) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Empty tag!\r\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+
+--- 3948,3954 ----
+ if (!m_Strings->size()) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Empty tag!\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+
+***************
+*** 4246,4260 ****
+ {
+ icChar buf[128];
+
+! sDescription = "\r\nData:\r\n";
+
+ if (IsTypeAscii()) {
+! sprintf(buf, "%s\r\n", (icChar*)m_pData);
+ sDescription += buf;
+ }
+ else
+ for (int i = 0; i<(int)m_nSize; i++) {
+! sprintf(buf, "%d\r\n", m_pData[i]);
+ sDescription += buf;
+ }
+
+--- 4246,4260 ----
+ {
+ icChar buf[128];
+
+! sDescription = "\nData:\n";
+
+ if (IsTypeAscii()) {
+! sprintf(buf, "%s\n", (icChar*)m_pData);
+ sDescription += buf;
+ }
+ else
+ for (int i = 0; i<(int)m_nSize; i++) {
+! sprintf(buf, "%d\n", m_pData[i]);
+ sDescription += buf;
+ }
+
+***************
+*** 4312,4318 ****
+ default:
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Invalid data flag encoding.\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+--- 4312,4318 ----
+ default:
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Invalid data flag encoding.\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+***************
+*** 4477,4487 ****
+ icChar buf[128];
+
+ sDescription = "Date = ";
+! sprintf(buf, "%u-%u-%u\r\n", m_DateTime.month, m_DateTime.day, m_DateTime.year);
+ sDescription += buf;
+
+ sDescription += "Time = ";
+! sprintf(buf, "%u:%u:%u\r\n", m_DateTime.hours, m_DateTime.minutes, m_DateTime.seconds);
+ sDescription += buf;
+ }
+
+--- 4477,4487 ----
+ icChar buf[128];
+
+ sDescription = "Date = ";
+! sprintf(buf, "%u-%u-%u\n", m_DateTime.month, m_DateTime.day, m_DateTime.year);
+ sDescription += buf;
+
+ sDescription += "Time = ";
+! sprintf(buf, "%u:%u:%u\n", m_DateTime.hours, m_DateTime.minutes, m_DateTime.seconds);
+ sDescription += buf;
+ }
+
+***************
+*** 4697,4708 ****
+ {
+ icChar buf[128];
+
+! sprintf(buf, "Colorant Count : %u\r\n", m_nCount);
+ sDescription += buf;
+! sDescription += "Order of Colorants:\r\n";
+
+ for (int i=0; i<(int)m_nCount; i++) {
+! sprintf(buf, "%u\r\n", m_pData[i]);
+ sDescription += buf;
+ }
+ }
+--- 4697,4708 ----
+ {
+ icChar buf[128];
+
+! sprintf(buf, "Colorant Count : %u\n", m_nCount);
+ sDescription += buf;
+! sDescription += "Order of Colorants:\n";
+
+ for (int i=0; i<(int)m_nCount; i++) {
+! sprintf(buf, "%u\n", m_pData[i]);
+ sDescription += buf;
+ }
+ }
+***************
+*** 4757,4763 ****
+ if (!pProfile) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ return rv;
+ }
+--- 4757,4763 ----
+ if (!pProfile) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ return rv;
+ }
+***************
+*** 4765,4771 ****
+ if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of colorants.\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+--- 4765,4771 ----
+ if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of colorants.\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+***************
+*** 4977,4983 ****
+ icUInt32Number i, nLen, nMaxLen=0;
+ icFloatNumber Lab[3];
+
+! sprintf(buf, "BEGIN_COLORANTS %u\r\n", m_nCount);
+ sDescription += buf;
+
+ for (i=0; i<m_nCount; i++) {
+--- 4977,4983 ----
+ icUInt32Number i, nLen, nMaxLen=0;
+ icFloatNumber Lab[3];
+
+! sprintf(buf, "BEGIN_COLORANTS %u\n", m_nCount);
+ sDescription += buf;
+
+ for (i=0; i<m_nCount; i++) {
+***************
+*** 4988,4998 ****
+ sDescription += "# NAME ";
+
+ if (m_PCS == icSigXYZData) {
+! sprintf(buf, "XYZ_X XYZ_Y XYZ_Z\r\n");
+ sDescription += buf;
+ }
+ else {
+! sprintf(buf, "Lab_L Lab_a Lab_b\r\n");
+ sDescription += buf;
+ }
+ for (i=0; i<m_nCount; i++) {
+--- 4988,4998 ----
+ sDescription += "# NAME ";
+
+ if (m_PCS == icSigXYZData) {
+! sprintf(buf, "XYZ_X XYZ_Y XYZ_Z\n");
+ sDescription += buf;
+ }
+ else {
+! sprintf(buf, "Lab_L Lab_a Lab_b\n");
+ sDescription += buf;
+ }
+ for (i=0; i<m_nCount; i++) {
+***************
+*** 5003,5009 ****
+ sDescription += buf;
+
+ if (m_PCS == icSigXYZData) {
+! sprintf(buf, "%7.4lf %7.4lf %7.4lf\r\n", icUSFtoD(m_pData[i].data[0]), icUSFtoD(m_pData[i].data[1]), icUSFtoD(m_pData[i].data[2]));
+ sDescription += buf;
+ }
+ else {
+--- 5003,5009 ----
+ sDescription += buf;
+
+ if (m_PCS == icSigXYZData) {
+! sprintf(buf, "%7.4lf %7.4lf %7.4lf\n", icUSFtoD(m_pData[i].data[0]), icUSFtoD(m_pData[i].data[1]), icUSFtoD(m_pData[i].data[2]));
+ sDescription += buf;
+ }
+ else {
+***************
+*** 5011,5017 ****
+ Lab[1] = icU16toF(m_pData[i].data[1]);
+ Lab[2] = icU16toF(m_pData[i].data[2]);
+ icLabFromPcs(Lab);
+! sprintf(buf, "%7.4lf %8.4lf %8.4lf\r\n", Lab[0], Lab[1], Lab[2]);
+ sDescription += buf;
+ }
+ }
+--- 5011,5017 ----
+ Lab[1] = icU16toF(m_pData[i].data[1]);
+ Lab[2] = icU16toF(m_pData[i].data[2]);
+ icLabFromPcs(Lab);
+! sprintf(buf, "%7.4lf %8.4lf %8.4lf\n", Lab[0], Lab[1], Lab[2]);
+ sDescription += buf;
+ }
+ }
+***************
+*** 5066,5072 ****
+ if (!pProfile) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ return rv;
+ }
+--- 5066,5072 ----
+ if (!pProfile) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ return rv;
+ }
+***************
+*** 5076,5082 ****
+ if (pProfile->m_Header.deviceClass!=icSigLinkClass) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Use of this tag is allowed only in DeviceLink Profiles.\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+ }
+--- 5076,5082 ----
+ if (pProfile->m_Header.deviceClass!=icSigLinkClass) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Use of this tag is allowed only in DeviceLink Profiles.\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+ }
+***************
+*** 5084,5090 ****
+ if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of colorants.\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+--- 5084,5090 ----
+ if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of colorants.\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+***************
+*** 5261,5273 ****
+ icChar buf[128];
+ CIccInfo Fmt;
+
+! sprintf(buf, "Illuminant Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\r\n",
+ icFtoD(m_XYZIllum.X),
+ icFtoD(m_XYZIllum.Y),
+ icFtoD(m_XYZIllum.Z));
+ sDescription += buf;
+
+! sprintf(buf, "Surround Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\r\n",
+ icFtoD(m_XYZSurround.X),
+ icFtoD(m_XYZSurround.Y),
+ icFtoD(m_XYZSurround.Z));
+--- 5261,5273 ----
+ icChar buf[128];
+ CIccInfo Fmt;
+
+! sprintf(buf, "Illuminant Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\n",
+ icFtoD(m_XYZIllum.X),
+ icFtoD(m_XYZIllum.Y),
+ icFtoD(m_XYZIllum.Z));
+ sDescription += buf;
+
+! sprintf(buf, "Surround Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\n",
+ icFtoD(m_XYZSurround.X),
+ icFtoD(m_XYZSurround.Y),
+ icFtoD(m_XYZSurround.Z));
+***************
+*** 5276,5282 ****
+ sDescription += "Illuminant Type: ";
+
+ sDescription += Fmt.GetIlluminantName(m_illumType);
+! sDescription += "\r\n";
+
+ }
+
+--- 5276,5282 ----
+ sDescription += "Illuminant Type: ";
+
+ sDescription += Fmt.GetIlluminantName(m_illumType);
+! sDescription += "\n";
+
+ }
+
+***************
+*** 5800,5831 ****
+ icChar buf[128], buf2[28];
+ icUInt32Number count=0;
+
+! sprintf(buf, "Number of Profile Description Structures: %u\r\n", m_Descriptions->size());
+ sDescription += buf;
+
+ for (i=m_Descriptions->begin(); i!=m_Descriptions->end(); i++, count++) {
+! sDescription += "\r\n";
+
+! sprintf(buf, "Profile Description Structure Number [%u] follows:\r\n", count+1);
+ sDescription += buf;
+
+! sprintf(buf, "Device Manufacturer Signature: %s\r\n", icGetSig(buf2, i->m_deviceMfg, false));
+ sDescription += buf;
+
+! sprintf(buf, "Device Model Signature: %s\r\n", icGetSig(buf2, i->m_deviceModel, false));
+ sDescription += buf;
+
+! sprintf(buf, "Device Attributes: %08x%08x\r\n", (icUInt32Number)(i->m_attributes >> 32), (icUInt32Number)(i->m_attributes));
+ sDescription += buf;
+
+! sprintf(buf, "Device Technology Signature: %s\r\n", icGetSig(buf2, i->m_technology, false));
+ sDescription += buf;
+
+! sprintf(buf, "Description of device manufacturer: \r\n");
+ sDescription += buf;
+ i->m_deviceMfgDesc.Describe(sDescription);
+
+! sprintf(buf, "Description of device model: \r\n");
+ sDescription += buf;
+ i->m_deviceModelDesc.Describe(sDescription);
+ }
+--- 5800,5831 ----
+ icChar buf[128], buf2[28];
+ icUInt32Number count=0;
+
+! sprintf(buf, "Number of Profile Description Structures: %u\n", m_Descriptions->size());
+ sDescription += buf;
+
+ for (i=m_Descriptions->begin(); i!=m_Descriptions->end(); i++, count++) {
+! sDescription += "\n";
+
+! sprintf(buf, "Profile Description Structure Number [%u] follows:\n", count+1);
+ sDescription += buf;
+
+! sprintf(buf, "Device Manufacturer Signature: %s\n", icGetSig(buf2, i->m_deviceMfg, false));
+ sDescription += buf;
+
+! sprintf(buf, "Device Model Signature: %s\n", icGetSig(buf2, i->m_deviceModel, false));
+ sDescription += buf;
+
+! sprintf(buf, "Device Attributes: %08x%08x\n", (icUInt32Number)(i->m_attributes >> 32), (icUInt32Number)(i->m_attributes));
+ sDescription += buf;
+
+! sprintf(buf, "Device Technology Signature: %s\n", icGetSig(buf2, i->m_technology, false));
+ sDescription += buf;
+
+! sprintf(buf, "Description of device manufacturer: \n");
+ sDescription += buf;
+ i->m_deviceMfgDesc.Describe(sDescription);
+
+! sprintf(buf, "Description of device model: \n");
+ sDescription += buf;
+ i->m_deviceModelDesc.Describe(sDescription);
+ }
+***************
+*** 5886,5892 ****
+ {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sprintf(buf, " - %s: Unknown Technology.\r\n", Info.GetSigName(i->m_technology));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+--- 5886,5892 ----
+ {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sprintf(buf, " - %s: Unknown Technology.\n", Info.GetSigName(i->m_technology));
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+***************
+*** 5896,5902 ****
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+
+! sReport += " Contains non-aligned deviceMfgDesc text tag information\r\n";
+
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+--- 5896,5902 ----
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+
+! sReport += " Contains non-aligned deviceMfgDesc text tag information\n";
+
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+***************
+*** 5905,5911 ****
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+
+! sReport += " Contains non-aligned deviceModelDesc text tag information\r\n";
+
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+--- 5905,5911 ----
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+
+! sReport += " Contains non-aligned deviceModelDesc text tag information\n";
+
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+***************
+*** 6174,6198 ****
+ CIccResponse16List::iterator j;
+
+ sDescription += "Measurement Unit: ";
+! sDescription += Fmt.GetMeasurementUnit((icSignature)GetMeasurementType()); sDescription += "\r\n";
+
+
+ for (int i=0; i<m_nChannels; i++) {
+ nResponseList = m_Response16ListArray[i];
+
+! sDescription += "\r\n";
+! sprintf(buf, "Maximum Colorant XYZ Measurement for Channel-%u : X=%.4lf, Y=%.4lf, Z=%.4lf\r\n", i+1,
+ icFtoD(m_maxColorantXYZ[i].X), icFtoD(m_maxColorantXYZ[i].Y), icFtoD(m_maxColorantXYZ[i].Z));
+ sDescription += buf;
+
+! sprintf(buf, "Number of Measurements for Channel-%u : %u\r\n", i+1, nResponseList.size());
+ sDescription += buf;
+
+! sprintf(buf, "Measurement Data for Channel-%u follows:\r\n", i+1);
+ sDescription += buf;
+
+ for (j=nResponseList.begin(); j!=nResponseList.end(); j++) {
+! sprintf(buf, "Device Value= %u : Measurement Value= %.4lf\r\n", j->deviceCode, icFtoD(j->measurementValue));
+ sDescription += buf;
+ }
+ }
+--- 6174,6198 ----
+ CIccResponse16List::iterator j;
+
+ sDescription += "Measurement Unit: ";
+! sDescription += Fmt.GetMeasurementUnit((icSignature)GetMeasurementType()); sDescription += "\n";
+
+
+ for (int i=0; i<m_nChannels; i++) {
+ nResponseList = m_Response16ListArray[i];
+
+! sDescription += "\n";
+! sprintf(buf, "Maximum Colorant XYZ Measurement for Channel-%u : X=%.4lf, Y=%.4lf, Z=%.4lf\n", i+1,
+ icFtoD(m_maxColorantXYZ[i].X), icFtoD(m_maxColorantXYZ[i].Y), icFtoD(m_maxColorantXYZ[i].Z));
+ sDescription += buf;
+
+! sprintf(buf, "Number of Measurements for Channel-%u : %u\n", i+1, nResponseList.size());
+ sDescription += buf;
+
+! sprintf(buf, "Measurement Data for Channel-%u follows:\n", i+1);
+ sDescription += buf;
+
+ for (j=nResponseList.begin(); j!=nResponseList.end(); j++) {
+! sprintf(buf, "Device Value= %u : Measurement Value= %.4lf\n", j->deviceCode, icFtoD(j->measurementValue));
+ sDescription += buf;
+ }
+ }
+***************
+*** 6234,6240 ****
+ default:
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Unknown measurement unit signature.\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+--- 6234,6240 ----
+ default:
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Unknown measurement unit signature.\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+***************
+*** 6241,6247 ****
+ if (!m_nChannels) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of channels.\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ return rv;
+ }
+--- 6241,6247 ----
+ if (!m_nChannels) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of channels.\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ return rv;
+ }
+***************
+*** 6479,6495 ****
+ CIccResponseCurveSet::iterator i;
+ icChar buf[128];
+
+! sprintf(buf, "Number of Channels: %u\r\n", m_nChannels);
+ sDescription += buf;
+
+! sprintf(buf, "Number of Measurement Types used: %u\r\n", m_ResponseCurves->size());
+ sDescription += buf;
+
+ int count = 0;
+ for (i=m_ResponseCurves->begin(); i!=m_ResponseCurves->end(); i++, count++) {
+! sDescription += "\r\n";
+
+! sprintf(buf, "Response Curve for measurement type [%u] follows:\r\n", count+1);
+ sDescription += buf;
+
+ i->Describe(sDescription);
+--- 6479,6495 ----
+ CIccResponseCurveSet::iterator i;
+ icChar buf[128];
+
+! sprintf(buf, "Number of Channels: %u\n", m_nChannels);
+ sDescription += buf;
+
+! sprintf(buf, "Number of Measurement Types used: %u\n", m_ResponseCurves->size());
+ sDescription += buf;
+
+ int count = 0;
+ for (i=m_ResponseCurves->begin(); i!=m_ResponseCurves->end(); i++, count++) {
+! sDescription += "\n";
+
+! sprintf(buf, "Response Curve for measurement type [%u] follows:\n", count+1);
+ sDescription += buf;
+
+ i->Describe(sDescription);
+***************
+*** 6658,6664 ****
+ if (!pProfile) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ return rv;
+ }
+--- 6658,6664 ----
+ if (!pProfile) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ return rv;
+ }
+***************
+*** 6666,6678 ****
+ if (m_nChannels!=icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of channels.\r\n";
+ }
+
+ if (!GetNumResponseCurveTypes()) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Empty Tag!.\r\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+ else {
+--- 6666,6678 ----
+ if (m_nChannels!=icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of channels.\n";
+ }
+
+ if (!GetNumResponseCurveTypes()) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Empty Tag!.\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+ else {
+*** misc/SampleICC-1.3.2/IccProfLib/IccTagLut.cpp Mon Aug 20 22:05:00 2007
+--- misc/build/SampleICC-1.3.2/IccProfLib/IccTagLut.cpp Fri Jan 25 14:23:09 2008
+***************
+*** 323,345 ****
+ icChar buf[128], *ptr;
+
+ if (!m_nSize) {
+! sprintf(buf, "BEGIN_CURVE In_Out\r\n");
+ sDescription += buf;
+! sDescription += "Y = X\r\n";
+ }
+ else if (m_nSize==1) {
+ icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
+! sprintf(buf, "BEGIN_CURVE In_Out\r\n");
+ sDescription += buf;
+! sprintf(buf, "Y = X ^ %.4lf\r\n", dGamma);
+ sDescription += buf;
+ }
+ else {
+ int i;
+
+! sprintf(buf, "BEGIN_LUT In_Out 1 1\r\n");
+ sDescription += buf;
+! sDescription += "IN OUT\r\n";
+
+ for (i=0; i<(int)m_nSize; i++) {
+ ptr = buf;
+--- 323,345 ----
+ icChar buf[128], *ptr;
+
+ if (!m_nSize) {
+! sprintf(buf, "BEGIN_CURVE In_Out\n");
+ sDescription += buf;
+! sDescription += "Y = X\n";
+ }
+ else if (m_nSize==1) {
+ icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
+! sprintf(buf, "BEGIN_CURVE In_Out\n");
+ sDescription += buf;
+! sprintf(buf, "Y = X ^ %.4lf\n", dGamma);
+ sDescription += buf;
+ }
+ else {
+ int i;
+
+! sprintf(buf, "BEGIN_LUT In_Out 1 1\n");
+ sDescription += buf;
+! sDescription += "IN OUT\n";
+
+ for (i=0; i<(int)m_nSize; i++) {
+ ptr = buf;
+***************
+*** 354,365 ****
+
+ ptr += strlen(ptr);
+
+! strcpy(ptr, "\r\n");
+
+ sDescription += buf;
+ }
+ }
+! sDescription += "\r\n";
+ }
+
+
+--- 354,365 ----
+
+ ptr += strlen(ptr);
+
+! strcpy(ptr, "\n");
+
+ sDescription += buf;
+ }
+ }
+! sDescription += "\n";
+ }
+
+
+***************
+*** 383,405 ****
+ icChar buf[128], *ptr;
+
+ if (!m_nSize) {
+! sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
+ sDescription += buf;
+! sDescription += "Y = X\r\n";
+ }
+ else if (m_nSize==1) {
+ icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
+! sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
+ sDescription += buf;
+! sprintf(buf, "Y = X ^ %.4lf\r\n", dGamma);
+ sDescription += buf;
+ }
+ else {
+ int i;
+
+! sprintf(buf, "BEGIN_LUT %s 1 1\r\n", szName);
+ sDescription += buf;
+! sDescription += "IN OUT\r\n";
+
+ sDescription.reserve(sDescription.size() + m_nSize * 20);
+
+--- 383,405 ----
+ icChar buf[128], *ptr;
+
+ if (!m_nSize) {
+! sprintf(buf, "BEGIN_CURVE %s\n", szName);
+ sDescription += buf;
+! sDescription += "Y = X\n";
+ }
+ else if (m_nSize==1) {
+ icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
+! sprintf(buf, "BEGIN_CURVE %s\n", szName);
+ sDescription += buf;
+! sprintf(buf, "Y = X ^ %.4lf\n", dGamma);
+ sDescription += buf;
+ }
+ else {
+ int i;
+
+! sprintf(buf, "BEGIN_LUT %s 1 1\n", szName);
+ sDescription += buf;
+! sDescription += "IN OUT\n";
+
+ sDescription.reserve(sDescription.size() + m_nSize * 20);
+
+***************
+*** 416,427 ****
+
+ ptr += strlen(ptr);
+
+! strcpy(ptr, "\r\n");
+
+ sDescription += buf;
+ }
+ }
+! sDescription += "\r\n";
+ }
+
+
+--- 416,427 ----
+
+ ptr += strlen(ptr);
+
+! strcpy(ptr, "\n");
+
+ sDescription += buf;
+ }
+ }
+! sDescription += "\n";
+ }
+
+
+***************
+*** 614,620 ****
+ if (m_Curve[0]>0.0 || m_Curve[m_nSize-1]<1.0) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Curve cannot be accurately inverted.\r\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+ }
+--- 614,620 ----
+ if (m_Curve[0]>0.0 || m_Curve[m_nSize-1]<1.0) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Curve cannot be accurately inverted.\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+ }
+***************
+*** 822,877 ****
+ {
+ icChar buf[128];
+
+! sprintf(buf, "FunctionType: %04Xh\r\n", m_nFunctionType);
+ sDescription += buf;
+
+ switch(m_nFunctionType) {
+ case 0x0000:
+! sprintf(buf, "Y = X ^ %.4lf\r\n", icFtoD(m_Param[0]));
+ sDescription += buf;
+ return;
+
+ case 0x0001:
+! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf / %.4lf)\r\n",
+ icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
+ -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
+ sDescription += buf;
+
+! sprintf(buf, "Y = 0 when (X < %.4lf / %.4lf)\r\n",
+ -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
+ sDescription += buf;
+ return;
+
+ case 0x0002:
+! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf / %.4lf)\r\n",
+ icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
+ icFtoD(m_Param[3]),
+ -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
+ sDescription += buf;
+
+! sprintf(buf, "Y = %.4lf when (X < %.4lf / %.4lf)\r\n", icFtoD(m_Param[3]),
+ -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
+ sDescription += buf;
+ return;
+
+ case 0x0003:
+! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf)\r\n",
+ icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
+ icFtoD(m_Param[4]));
+ sDescription += buf;
+
+! sprintf(buf, "Y = %lf * X when (X < %.4lf)\r\n",
+ icFtoD(m_Param[3]), icFtoD(m_Param[4]));
+ sDescription += buf;
+ return;
+
+ case 0x0004:
+! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf)\r\n",
+ icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
+ icFtoD(m_Param[5]), icFtoD(m_Param[4]));
+ sDescription += buf;
+
+! sprintf(buf, "Y = %lf * X + %.4lf when (X < %.4lf)\r\n",
+ icFtoD(m_Param[3]), icFtoD(m_Param[6]), icFtoD(m_Param[4]));
+ sDescription += buf;
+ return;
+--- 822,877 ----
+ {
+ icChar buf[128];
+
+! sprintf(buf, "FunctionType: %04Xh\n", m_nFunctionType);
+ sDescription += buf;
+
+ switch(m_nFunctionType) {
+ case 0x0000:
+! sprintf(buf, "Y = X ^ %.4lf\n", icFtoD(m_Param[0]));
+ sDescription += buf;
+ return;
+
+ case 0x0001:
+! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf / %.4lf)\n",
+ icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
+ -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
+ sDescription += buf;
+
+! sprintf(buf, "Y = 0 when (X < %.4lf / %.4lf)\n",
+ -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
+ sDescription += buf;
+ return;
+
+ case 0x0002:
+! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf / %.4lf)\n",
+ icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
+ icFtoD(m_Param[3]),
+ -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
+ sDescription += buf;
+
+! sprintf(buf, "Y = %.4lf when (X < %.4lf / %.4lf)\n", icFtoD(m_Param[3]),
+ -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
+ sDescription += buf;
+ return;
+
+ case 0x0003:
+! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf)\n",
+ icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
+ icFtoD(m_Param[4]));
+ sDescription += buf;
+
+! sprintf(buf, "Y = %lf * X when (X < %.4lf)\n",
+ icFtoD(m_Param[3]), icFtoD(m_Param[4]));
+ sDescription += buf;
+ return;
+
+ case 0x0004:
+! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf)\n",
+ icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
+ icFtoD(m_Param[5]), icFtoD(m_Param[4]));
+ sDescription += buf;
+
+! sprintf(buf, "Y = %lf * X + %.4lf when (X < %.4lf)\n",
+ icFtoD(m_Param[3]), icFtoD(m_Param[6]), icFtoD(m_Param[4]));
+ sDescription += buf;
+ return;
+***************
+*** 878,888 ****
+
+ default:
+ int i;
+! sprintf(buf, "Unknown Function with %d parameters:\r\n");
+ sDescription += buf;
+
+ for (i=0; i<m_nNumParam; i++) {
+! sprintf(buf, "Param[%d] = %.4lf\r\n", i, icFtoD(m_Param[i]));
+ sDescription += buf;
+ }
+ }
+--- 878,888 ----
+
+ default:
+ int i;
+! sprintf(buf, "Unknown Function with %d parameters:\n", m_nNumParam);
+ sDescription += buf;
+
+ for (i=0; i<m_nNumParam; i++) {
+! sprintf(buf, "Param[%d] = %.4lf\n", i, icFtoD(m_Param[i]));
+ sDescription += buf;
+ }
+ }
+***************
+*** 907,916 ****
+ {
+ icChar buf[128];
+
+! sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
+ sDescription += buf;
+ Describe(sDescription);
+! sDescription += "\r\n";
+ }
+
+
+--- 907,916 ----
+ {
+ icChar buf[128];
+
+! sprintf(buf, "BEGIN_CURVE %s\n", szName);
+ sDescription += buf;
+ Describe(sDescription);
+! sDescription += "\n";
+ }
+
+
+***************
+*** 1106,1112 ****
+ if (m_nReserved2!=0) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Reserved Value must be zero.\r\n";
+
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+--- 1106,1112 ----
+ if (m_nReserved2!=0) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Reserved Value must be zero.\n";
+
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+***************
+*** 1116,1122 ****
+ if (m_nNumParam!=1) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Number of parameters inconsistent with function type.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ break;
+--- 1116,1122 ----
+ if (m_nNumParam!=1) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Number of parameters inconsistent with function type.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ break;
+***************
+*** 1125,1131 ****
+ if (m_nNumParam!=3) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Number of parameters inconsistent with function type.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ break;
+--- 1125,1131 ----
+ if (m_nNumParam!=3) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Number of parameters inconsistent with function type.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ break;
+***************
+*** 1134,1140 ****
+ if (m_nNumParam!=4) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Number of parameters inconsistent with function type.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ break;
+--- 1134,1140 ----
+ if (m_nNumParam!=4) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Number of parameters inconsistent with function type.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ break;
+***************
+*** 1143,1149 ****
+ if (m_nNumParam!=5) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Number of parameters inconsistent with function type.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ break;
+--- 1143,1149 ----
+ if (m_nNumParam!=5) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Number of parameters inconsistent with function type.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ break;
+***************
+*** 1152,1158 ****
+ if (m_nNumParam!=7) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Number of parameters inconsistent with function type.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ break;
+--- 1152,1158 ----
+ if (m_nNumParam!=7) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Number of parameters inconsistent with function type.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ break;
+***************
+*** 1160,1166 ****
+ default:
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Unknown function type.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+--- 1160,1166 ----
+ default:
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Unknown function type.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+***************
+*** 1170,1176 ****
+ if (lval>0.0 || uval<1.0) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Curve cannot be accurately inverted.\r\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+ }
+--- 1170,1176 ----
+ if (lval>0.0 || uval<1.0) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Curve cannot be accurately inverted.\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+ }
+***************
+*** 1255,1286 ****
+ {
+ icChar buf[128];
+
+! sprintf(buf, "BEGIN_MATRIX %s\r\n", szName);
+ sDescription += buf;
+
+ if (!m_bUseConstants) {
+! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
+ m_e[0], m_e[1], m_e[2]);
+ sDescription += buf;
+! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
+ m_e[3], m_e[4], m_e[5]);
+ sDescription += buf;
+! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
+ m_e[6], m_e[7], m_e[8]);
+ sDescription += buf;
+ }
+ else {
+! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
+ m_e[0], m_e[1], m_e[2], m_e[9]);
+ sDescription += buf;
+! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
+ m_e[3], m_e[4], m_e[5], m_e[10]);
+ sDescription += buf;
+! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
+ m_e[6], m_e[7], m_e[8], m_e[11]);
+ sDescription += buf;
+ }
+! sDescription += "\r\n";
+ }
+
+ /**
+--- 1255,1286 ----
+ {
+ icChar buf[128];
+
+! sprintf(buf, "BEGIN_MATRIX %s\n", szName);
+ sDescription += buf;
+
+ if (!m_bUseConstants) {
+! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
+ m_e[0], m_e[1], m_e[2]);
+ sDescription += buf;
+! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
+ m_e[3], m_e[4], m_e[5]);
+ sDescription += buf;
+! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
+ m_e[6], m_e[7], m_e[8]);
+ sDescription += buf;
+ }
+ else {
+! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
+ m_e[0], m_e[1], m_e[2], m_e[9]);
+ sDescription += buf;
+! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
+ m_e[3], m_e[4], m_e[5], m_e[10]);
+ sDescription += buf;
+! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
+ m_e[6], m_e[7], m_e[8], m_e[11]);
+ sDescription += buf;
+ }
+! sDescription += "\n";
+ }
+
+ /**
+***************
+*** 1377,1383 ****
+ if (m_e[0]!=1.0 || m_e[4]!=1.0 || m_e[9]!=1.0 || sum!=3.0) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Matrix must be identity.\r\n";
+ rv = icValidateNonCompliant;
+ }
+ }
+--- 1377,1383 ----
+ if (m_e[0]!=1.0 || m_e[4]!=1.0 || m_e[9]!=1.0 || sum!=3.0) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Matrix must be identity.\n";
+ rv = icValidateNonCompliant;
+ }
+ }
+***************
+*** 1754,1760 ****
+
+ ptr += sprintf(ptr, " %s", m_pVal);
+ }
+! strcpy(ptr, "\r\n");
+ sDescription += (const icChar*)m_pOutText;
+
+ }
+--- 1754,1760 ----
+
+ ptr += sprintf(ptr, " %s", m_pVal);
+ }
+! strcpy(ptr, "\n");
+ sDescription += (const icChar*)m_pOutText;
+
+ }
+***************
+*** 1866,1872 ****
+ icChar szOutText[2048], szColor[40];
+ int i, len;
+
+! sprintf(szOutText, "BEGIN_LUT %s %d %d\r\n", szName, m_nInput, m_nOutput);
+ sDescription += szOutText;
+
+ for (i=0; i<m_nInput; i++) {
+--- 1866,1872 ----
+ icChar szOutText[2048], szColor[40];
+ int i, len;
+
+! sprintf(szOutText, "BEGIN_LUT %s %d %d\n", szName, m_nInput, m_nOutput);
+ sDescription += szOutText;
+
+ for (i=0; i<m_nInput; i++) {
+***************
+*** 1883,1889 ****
+ sDescription += szOutText;
+ }
+
+! sDescription += "\r\n";
+
+ len = 0;
+ for (i=0; i<m_nInput; i++) {
+--- 1883,1889 ----
+ sDescription += szOutText;
+ }
+
+! sDescription += "\n";
+
+ len = 0;
+ for (i=0; i<m_nInput; i++) {
+***************
+*** 1907,1913 ****
+
+ Iterate(sDescription, 0, 0);
+
+! sDescription += "\r\n";
+ }
+
+
+--- 1907,1913 ----
+
+ Iterate(sDescription, 0, 0);
+
+! sDescription += "\n";
+ }
+
+
+***************
+*** 2693,2699 ****
+ if (m_nReserved2[0]!=0 || m_nReserved2[1]!=0 || m_nReserved2[2]!=0) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Reserved Value must be zero.\r\n";
+
+ rv = icValidateNonCompliant;
+ }
+--- 2693,2699 ----
+ if (m_nReserved2[0]!=0 || m_nReserved2[1]!=0 || m_nReserved2[2]!=0) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - Reserved Value must be zero.\n";
+
+ rv = icValidateNonCompliant;
+ }
+***************
+*** 2704,2710 ****
+ if (m_GridPoints[i]<2) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sprintf(temp, " - CLUT: At least 2 grid points should be present in dimension %u.\r\n",i );
+ sReport += temp;
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+--- 2704,2710 ----
+ if (m_GridPoints[i]<2) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sprintf(temp, " - CLUT: At least 2 grid points should be present in dimension %u.\n",i );
+ sReport += temp;
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+***************
+*** 3122,3128 ****
+ if (!pProfile) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ return rv;
+ }
+--- 3122,3128 ----
+ if (!pProfile) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ return rv;
+ }
+***************
+*** 3138,3144 ****
+ if (m_nInput!=nInput) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of input channels.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+--- 3138,3144 ----
+ if (m_nInput!=nInput) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of input channels.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+***************
+*** 3146,3152 ****
+ if (m_nOutput!=nOutput) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of output channels.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+--- 3146,3152 ----
+ if (m_nOutput!=nOutput) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of output channels.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+***************
+*** 3160,3166 ****
+ if (m_nInput!=nInput) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of input channels.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+--- 3160,3166 ----
+ if (m_nInput!=nInput) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of input channels.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+***************
+*** 3168,3174 ****
+ if (m_nOutput!=nOutput) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of output channels.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+--- 3168,3174 ----
+ if (m_nOutput!=nOutput) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of output channels.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+***************
+*** 3180,3186 ****
+ if (m_nInput!=nInput) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of input channels.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+--- 3180,3186 ----
+ if (m_nInput!=nInput) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of input channels.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+***************
+*** 3188,3194 ****
+ if (m_nOutput!=nOutput) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of output channels.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+--- 3188,3194 ----
+ if (m_nOutput!=nOutput) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of output channels.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+***************
+*** 3206,3212 ****
+ if (!m_CLUT) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - CLUT must be present.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+--- 3206,3212 ----
+ if (!m_CLUT) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - CLUT must be present.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+***************
+*** 3748,3754 ****
+ else {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of B-curves.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+--- 3748,3754 ----
+ else {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of B-curves.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+***************
+*** 3762,3768 ****
+ else {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of M-curves.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+--- 3762,3768 ----
+ else {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of M-curves.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+***************
+*** 3772,3778 ****
+ if (!m_CLUT) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - CLUT must be present if using A-curves.\r\n";
+
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+--- 3772,3778 ----
+ if (!m_CLUT) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - CLUT must be present if using A-curves.\n";
+
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+***************
+*** 3784,3790 ****
+ else {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of A-curves.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+--- 3784,3790 ----
+ else {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of A-curves.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+***************
+*** 3876,3882 ****
+ if (!pProfile) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ return rv;
+ }
+--- 3876,3882 ----
+ if (!pProfile) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ return rv;
+ }
+***************
+*** 3900,3906 ****
+ if (m_nOutput!=nOutput) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of output channels.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+--- 3900,3906 ----
+ if (m_nOutput!=nOutput) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of output channels.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+
+***************
+*** 3913,3919 ****
+ else {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of B-curves.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+--- 3913,3919 ----
+ else {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of B-curves.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+***************
+*** 3927,3933 ****
+ else {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of M-curves.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+--- 3927,3933 ----
+ else {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of M-curves.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+***************
+*** 3937,3943 ****
+ if (!m_CLUT) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - CLUT must be present if using A-curves.\r\n";
+
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+--- 3937,3943 ----
+ if (!m_CLUT) {
+ sReport += icValidateNonCompliantMsg;
+ sReport += sSigName;
+! sReport += " - CLUT must be present if using A-curves.\n";
+
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+***************
+*** 3949,3955 ****
+ else {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of A-curves.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+--- 3949,3955 ----
+ else {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of A-curves.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+***************
+*** 4311,4317 ****
+ if (pTagCurve->GetSize()==1) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - lut8Tags do not support single entry gamma curves.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+--- 4311,4317 ----
+ if (pTagCurve->GetSize()==1) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - lut8Tags do not support single entry gamma curves.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+***************
+*** 4319,4325 ****
+ else {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of B-curves.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+--- 4319,4325 ----
+ else {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of B-curves.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+***************
+*** 4336,4342 ****
+ if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Matrix must be identity.\r\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+ }
+--- 4336,4342 ----
+ if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Matrix must be identity.\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+ }
+***************
+*** 4351,4357 ****
+ if (pTagCurve->GetSize()==1) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - lut8Tags do not support single entry gamma curves.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+--- 4351,4357 ----
+ if (pTagCurve->GetSize()==1) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - lut8Tags do not support single entry gamma curves.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+***************
+*** 4359,4365 ****
+ else {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of A-curves.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+--- 4359,4365 ----
+ else {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of A-curves.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+***************
+*** 4721,4727 ****
+ if (pTagCurve->GetSize()==1) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - lut16Tags do not support single entry gamma curves.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+--- 4721,4727 ----
+ if (pTagCurve->GetSize()==1) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - lut16Tags do not support single entry gamma curves.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+***************
+*** 4729,4735 ****
+ else {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of B-curves.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+--- 4729,4735 ----
+ else {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of B-curves.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+***************
+*** 4746,4752 ****
+ if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Matrix must be identity.\r\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+ }
+--- 4746,4752 ----
+ if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " - Matrix must be identity.\n";
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+ }
+***************
+*** 4761,4767 ****
+ if (pTagCurve->GetSize()==1) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - lut16Tags do not support single entry gamma curves.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+--- 4761,4767 ----
+ if (pTagCurve->GetSize()==1) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - lut16Tags do not support single entry gamma curves.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+***************
+*** 4769,4775 ****
+ else {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of A-curves.\r\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+--- 4769,4775 ----
+ else {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " - Incorrect number of A-curves.\n";
+ rv = icMaxStatus(rv, icValidateCriticalError);
+ }
+ }
+*** misc/SampleICC-1.3.2/IccProfLib/IccTagMPE.cpp Mon Aug 20 22:05:00 2007
+--- misc/build/SampleICC-1.3.2/IccProfLib/IccTagMPE.cpp Fri Jan 25 14:23:09 2008
+***************
+*** 218,224 ****
+ icGetSig(sigbuf, m_sig), m_nSize);
+ sDescription += buf;
+
+! sDescription += "\r\n\r\nData Follows:\r\n";
+
+ icMemDump(sDescription, m_pData, m_nSize);
+
+--- 218,224 ----
+ icGetSig(sigbuf, m_sig), m_nSize);
+ sDescription += buf;
+
+! sDescription += "\n\nData Follows:\n";
+
+ icMemDump(sDescription, m_pData, m_nSize);
+
+***************
+*** 364,370 ****
+ sReport += " - Contains unknown processing element type (";
+ icGetSig(buf, m_sig, true);
+ sReport += buf;
+! sReport += ").\r\n";
+
+ return icValidateCriticalError;
+ }
+--- 364,370 ----
+ sReport += " - Contains unknown processing element type (";
+ icGetSig(buf, m_sig, true);
+ sReport += buf;
+! sReport += ").\n";
+
+ return icValidateCriticalError;
+ }
+***************
+*** 392,398 ****
+ sReport += " - Element ";
+ sSigName = Info.GetSigName(GetType());
+ sReport += sSigName;
+! sReport += " - Reserved Value must be zero.\r\n";
+
+ rv = icValidateNonCompliant;
+ }
+--- 392,398 ----
+ sReport += " - Element ";
+ sSigName = Info.GetSigName(GetType());
+ sReport += sSigName;
+! sReport += " - Reserved Value must be zero.\n";
+
+ rv = icValidateNonCompliant;
+ }
+***************
+*** 738,755 ****
+ {
+ icChar buf[128];
+
+! sprintf(buf, "BEGIN MULTI_PROCESS_ELEMENT_TAG %d %d\r\n", m_nInputChannels, m_nOutputChannels);
+ sDescription += buf;
+! sDescription += "\r\n";
+
+ CIccMultiProcessElementList::iterator i;
+ int j;
+
+ for (j=0, i=m_list->begin(); i!=m_list->end(); j++, i++) {
+! sprintf(buf, "PROCESS_ELEMENT #%d\r\n", j+1);
+ sDescription += buf;
+ i->ptr->Describe(sDescription);
+! sDescription += "\r\n";
+ }
+ }
+
+--- 738,755 ----
+ {
+ icChar buf[128];
+
+! sprintf(buf, "BEGIN MULTI_PROCESS_ELEMENT_TAG %d %d\n", m_nInputChannels, m_nOutputChannels);
+ sDescription += buf;
+! sDescription += "\n";
+
+ CIccMultiProcessElementList::iterator i;
+ int j;
+
+ for (j=0, i=m_list->begin(); i!=m_list->end(); j++, i++) {
+! sprintf(buf, "PROCESS_ELEMENT #%d\n", j+1);
+ sDescription += buf;
+ i->ptr->Describe(sDescription);
+! sDescription += "\n";
+ }
+ }
+
+***************
+*** 1207,1219 ****
+ if (m_nInputChannels != m_nOutputChannels) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " No processing elements and input and output channels do not match!\r\n";
+ return icValidateCriticalError;
+ }
+ else {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " No processing elements.\r\n";
+ return icValidateWarning;
+ }
+ }
+--- 1207,1219 ----
+ if (m_nInputChannels != m_nOutputChannels) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " No processing elements and input and output channels do not match!\n";
+ return icValidateCriticalError;
+ }
+ else {
+ sReport += icValidateWarningMsg;
+ sReport += sSigName;
+! sReport += " No processing elements.\n";
+ return icValidateWarning;
+ }
+ }
+***************
+*** 1224,1230 ****
+ if (i->ptr->NumInputChannels() != m_nInputChannels) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " Mis-matching number of input channels!\r\n";
+ return icValidateCriticalError;
+ }
+
+--- 1224,1230 ----
+ if (i->ptr->NumInputChannels() != m_nInputChannels) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " Mis-matching number of input channels!\n";
+ return icValidateCriticalError;
+ }
+
+***************
+*** 1239,1245 ****
+ sReport += "->";
+ sReport += i->ptr->GetClassName();
+
+! sReport += " Mis-matching number of channels!\r\n";
+ return icValidateCriticalError;
+ }
+ }
+--- 1239,1245 ----
+ sReport += "->";
+ sReport += i->ptr->GetClassName();
+
+! sReport += " Mis-matching number of channels!\n";
+ return icValidateCriticalError;
+ }
+ }
+***************
+*** 1251,1257 ****
+ if (last && last->NumOutputChannels() != m_nOutputChannels) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " Mis-matching number of output channels!\r\n";
+ return icValidateCriticalError;
+ }
+
+--- 1251,1257 ----
+ if (last && last->NumOutputChannels() != m_nOutputChannels) {
+ sReport += icValidateCriticalErrorMsg;
+ sReport += sSigName;
+! sReport += " Mis-matching number of output channels!\n";
+ return icValidateCriticalError;
+ }
+
+*** misc/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.cpp Mon Aug 20 22:05:00 2007
+--- misc/build/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.cpp Fri Jan 25 14:23:09 2008
+***************
+*** 234,240 ****
+ {
+ std::string Dump;
+
+! sDescription += "ProfileID:\r\n";
+
+ int i;
+ char buf[20];
+--- 234,240 ----
+ {
+ std::string Dump;
+
+! sDescription += "ProfileID:\n";
+
+ int i;
+ char buf[20];
+***************
+*** 244,255 ****
+ sprintf(buf, "%2x", m_profileID.ID8[i]);
+ sDescription += buf;
+ }
+! sDescription += "\r\n";
+
+! sDescription += "Description:\r\n";
+ m_desc.Describe(sDescription);
+
+! sDescription += "\r\n";
+ }
+
+
+--- 244,255 ----
+ sprintf(buf, "%2x", m_profileID.ID8[i]);
+ sDescription += buf;
+ }
+! sDescription += "\n";
+
+! sDescription += "Description:\n";
+ m_desc.Describe(sDescription);
+
+! sDescription += "\n";
+ }
+
+
+***************
+*** 434,454 ****
+ {
+ icChar buf[128];
+
+! sprintf(buf, "BEGIN ProfileSequenceIdentification_TAG\r\n");
+ sDescription += buf;
+! sDescription += "\r\n";
+
+ int i;
+ CIccProfileIdDescList::iterator j;
+ for (i=0, j=m_list->begin(); j!=m_list->end(); i++, j++) {
+! sprintf(buf, "ProfileDescription_%d:\r\n", i+1);
+ sDescription += buf;
+ j->Describe(sDescription);
+ }
+
+! sprintf(buf, "END ProfileSequenceIdentification_TAG\r\n");
+ sDescription += buf;
+! sDescription += "\r\n";
+ }
+
+
+--- 434,454 ----
+ {
+ icChar buf[128];
+
+! sprintf(buf, "BEGIN ProfileSequenceIdentification_TAG\n");
+ sDescription += buf;
+! sDescription += "\n";
+
+ int i;
+ CIccProfileIdDescList::iterator j;
+ for (i=0, j=m_list->begin(); j!=m_list->end(); i++, j++) {
+! sprintf(buf, "ProfileDescription_%d:\n", i+1);
+ sDescription += buf;
+ j->Describe(sDescription);
+ }
+
+! sprintf(buf, "END ProfileSequenceIdentification_TAG\n");
+ sDescription += buf;
+! sDescription += "\n";
+ }
+
+
+*** misc/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.h Mon Aug 20 22:05:00 2007
+--- misc/build/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.h Fri Jan 25 14:23:09 2008
+***************
+*** 161,164 ****
+ }
+ #endif
+
+! #endif //_ICCTAGPROFSEQID_H
+--- 161,164 ----
+ }
+ #endif
+
+! #endif //_ICCTAGPROFSEQID_H
+*** misc/SampleICC-1.3.2/IccProfLib/IccUtil.cpp Mon Aug 20 22:05:00 2007
+--- misc/build/SampleICC-1.3.2/IccProfLib/IccUtil.cpp Fri Jan 25 14:23:09 2008
+***************
+*** 79,85 ****
+ #include "IccUtil.h"
+ #include "IccTagFactory.h"
+ #include <stdlib.h>
+! #include <memory.h>
+ #include <ctype.h>
+ #include <math.h>
+ #include <string.h>
+--- 79,85 ----
+ #include "IccUtil.h"
+ #include "IccTagFactory.h"
+ #include <stdlib.h>
+! #include <memory>
+ #include <ctype.h>
+ #include <math.h>
+ #include <string.h>
+***************
+*** 678,688 ****
+ {
+ icChar buf[128];
+
+! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[0]), icFtoD(pMatrix[1]), icFtoD(pMatrix[2]));
+ sDump += buf;
+! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[3]), icFtoD(pMatrix[4]), icFtoD(pMatrix[5]));
+ sDump += buf;
+! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[6]), icFtoD(pMatrix[7]), icFtoD(pMatrix[8]));
+ sDump += buf;
+ }
+
+--- 679,689 ----
+ {
+ icChar buf[128];
+
+! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[0]), icFtoD(pMatrix[1]), icFtoD(pMatrix[2]));
+ sDump += buf;
+! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[3]), icFtoD(pMatrix[4]), icFtoD(pMatrix[5]));
+ sDump += buf;
+! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[6]), icFtoD(pMatrix[7]), icFtoD(pMatrix[8]));
+ sDump += buf;
+ }
+
+***************
+*** 1516,1534 ****
+
+ if (XYZ.X < 0) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += " - XYZNumber: Negative X value!\r\n";
+ rv = icValidateNonCompliant;
+ }
+
+ if (XYZ.Y < 0) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += " - XYZNumber: Negative Y value!\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+ if (XYZ.Z < 0) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += " - XYZNumber: Negative Z value!\r\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+--- 1517,1535 ----
+
+ if (XYZ.X < 0) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += " - XYZNumber: Negative X value!\n";
+ rv = icValidateNonCompliant;
+ }
+
+ if (XYZ.Y < 0) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += " - XYZNumber: Negative Y value!\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+ if (XYZ.Z < 0) {
+ sReport += icValidateNonCompliantMsg;
+! sReport += " - XYZNumber: Negative Z value!\n";
+ rv = icMaxStatus(rv, icValidateNonCompliant);
+ }
+
+***************
+*** 1548,1554 ****
+ icChar buf[128];
+ if (dateTime.year<1992) {
+ sReport += icValidateWarningMsg;
+! sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
+ sReport += buf;
+ rv = icValidateWarning;
+ }
+--- 1549,1555 ----
+ icChar buf[128];
+ if (dateTime.year<1992) {
+ sReport += icValidateWarningMsg;
+! sprintf(buf," - %u: Invalid year!\n",dateTime.year);
+ sReport += buf;
+ rv = icValidateWarning;
+ }
+***************
+*** 1557,1563 ****
+ if (newtime->tm_mon==11 && newtime->tm_mday==31) {
+ if (dateTime.year>(year+1)) {
+ sReport += icValidateWarningMsg;
+! sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+--- 1558,1564 ----
+ if (newtime->tm_mon==11 && newtime->tm_mday==31) {
+ if (dateTime.year>(year+1)) {
+ sReport += icValidateWarningMsg;
+! sprintf(buf," - %u: Invalid year!\n",dateTime.year);
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+***************
+*** 1565,1571 ****
+ else {
+ if (dateTime.year>year) {
+ sReport += icValidateWarningMsg;
+! sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+--- 1566,1572 ----
+ else {
+ if (dateTime.year>year) {
+ sReport += icValidateWarningMsg;
+! sprintf(buf," - %u: Invalid year!\n",dateTime.year);
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+***************
+*** 1573,1579 ****
+
+ if (dateTime.month<1 || dateTime.month>12) {
+ sReport += icValidateWarningMsg;
+! sprintf(buf," - %u: Invalid month!\r\n",dateTime.month);
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+--- 1574,1580 ----
+
+ if (dateTime.month<1 || dateTime.month>12) {
+ sReport += icValidateWarningMsg;
+! sprintf(buf," - %u: Invalid month!\n",dateTime.month);
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+***************
+*** 1580,1586 ****
+
+ if (dateTime.day<1 || dateTime.day>31) {
+ sReport += icValidateWarningMsg;
+! sprintf(buf," - %u: Invalid day!\r\n",dateTime.day);
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+--- 1581,1587 ----
+
+ if (dateTime.day<1 || dateTime.day>31) {
+ sReport += icValidateWarningMsg;
+! sprintf(buf," - %u: Invalid day!\n",dateTime.day);
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+***************
+*** 1588,1594 ****
+ if (dateTime.month==2) {
+ if (dateTime.day>29) {
+ sReport += icValidateWarningMsg;
+! sprintf(buf," - %u: Invalid day for February!\r\n",dateTime.day);
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+--- 1589,1595 ----
+ if (dateTime.month==2) {
+ if (dateTime.day>29) {
+ sReport += icValidateWarningMsg;
+! sprintf(buf," - %u: Invalid day for February!\n",dateTime.day);
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+***************
+*** 1596,1602 ****
+ if (dateTime.day==29) {
+ if ((dateTime.year%4)!=0) {
+ sReport += icValidateWarningMsg;
+! sprintf(buf," - %u: Invalid day for February, year is not a leap year(%u)!\r\n",dateTime.day, dateTime.year);
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+--- 1597,1603 ----
+ if (dateTime.day==29) {
+ if ((dateTime.year%4)!=0) {
+ sReport += icValidateWarningMsg;
+! sprintf(buf," - %u: Invalid day for February, year is not a leap year(%u)!\n",dateTime.day, dateTime.year);
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+***************
+*** 1605,1611 ****
+
+ if (dateTime.hours>23) {
+ sReport += icValidateWarningMsg;
+! sprintf(buf," - %u: Invalid hour!\r\n",dateTime.hours);
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+--- 1606,1612 ----
+
+ if (dateTime.hours>23) {
+ sReport += icValidateWarningMsg;
+! sprintf(buf," - %u: Invalid hour!\n",dateTime.hours);
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+***************
+*** 1612,1618 ****
+
+ if (dateTime.minutes>59) {
+ sReport += icValidateWarningMsg;
+! sprintf(buf," - %u: Invalid minutes!\r\n",dateTime.minutes);
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+--- 1613,1619 ----
+
+ if (dateTime.minutes>59) {
+ sReport += icValidateWarningMsg;
+! sprintf(buf," - %u: Invalid minutes!\n",dateTime.minutes);
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+***************
+*** 1619,1625 ****
+
+ if (dateTime.seconds>59) {
+ sReport += icValidateWarningMsg;
+! sprintf(buf," - %u: Invalid seconds!\r\n",dateTime.hours);
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+--- 1620,1626 ----
+
+ if (dateTime.seconds>59) {
+ sReport += icValidateWarningMsg;
+! sprintf(buf," - %u: Invalid seconds!\n",dateTime.hours);
+ sReport += buf;
+ rv = icMaxStatus(rv, icValidateWarning);
+ }
+*** misc/SampleICC-1.3.2/IccProfLib/icProfileHeader.h Mon Aug 20 22:05:00 2007
+--- misc/build/SampleICC-1.3.2/IccProfLib/icProfileHeader.h Fri Jan 25 14:23:09 2008
+***************
+*** 659,668 ****
+ typedef enum {
+ icFlare0 = 0x00000000, /* 0% flare */
+ icFlare100 = 0x00000001, /* 100% flare */
+ } icMeasurementFlare;
+
+ /** Convenience Enum Definition - Not defined in ICC specification*/
+! #define icMaxEnumFlare ((icMeasurementFlare) 0xFFFFFFFF)
+ #define icMaxFlare ((icMeasurementFlare) 0xFFFFFFFF) /* as defined by earlier versions */
+
+
+--- 659,669 ----
+ typedef enum {
+ icFlare0 = 0x00000000, /* 0% flare */
+ icFlare100 = 0x00000001, /* 100% flare */
++ icMaxEnumFlare = 0xFFFFFFFF
+ } icMeasurementFlare;
+
+ /** Convenience Enum Definition - Not defined in ICC specification*/
+! /*#define icMaxEnumFlare ((icMeasurementFlare) 0xFFFFFFFF)*/
+ #define icMaxFlare ((icMeasurementFlare) 0xFFFFFFFF) /* as defined by earlier versions */
+
+
+*** misc/SampleICC-1.3.2/Tools/CmdLine/Makefile.in Mon Aug 20 22:10:42 2007
+--- misc/build/SampleICC-1.3.2/Tools/CmdLine/Makefile.in Fri Jan 25 14:23:09 2008
+***************
+*** 101,117 ****
+ am__quote = @am__quote@
+ install_sh = @install_sh@
+
+! SUBDIRS = IccApplyNamedCmm \
+! @SICC_ICC_APPLY_PROFILES@ \
+! IccDumpProfile \
+ IccProfLibTest \
+ IccStripUnknownTags \
+ IccV4ToMPE
+
+
+! DIST_SUBDIRS = IccApplyNamedCmm \
+! IccApplyProfiles \
+! IccDumpProfile \
+ IccProfLibTest \
+ IccStripUnknownTags \
+ IccV4ToMPE
+--- 101,113 ----
+ am__quote = @am__quote@
+ install_sh = @install_sh@
+
+! SUBDIRS = IccDumpProfile \
+ IccProfLibTest \
+ IccStripUnknownTags \
+ IccV4ToMPE
+
+
+! DIST_SUBDIRS = IccDumpProfile \
+ IccProfLibTest \
+ IccStripUnknownTags \
+ IccV4ToMPE
+*** misc/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp 2007-08-20 22:04:53.000000000 +0200
+--- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp 2008-01-31 13:53:16.000000000 +0100
+***************
+*** 77,82 ****
+--- 77,84 ----
+ //
+ //////////////////////////////////////////////////////////////////////
+
++ #include <stdlib.h>
++ #include <string.h>
+ #include <iostream>
+ #include <fstream>
+ #include <sstream>
+*** misc/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h 2007-08-20 22:04:54.000000000 +0200
+--- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h 2008-01-31 13:54:51.000000000 +0100
+***************
+*** 83,88 ****
+--- 83,89 ----
+ #ifndef __DEFINED_ICC_TOOL_EXCEPTION_H__
+ #define __DEFINED_ICC_TOOL_EXCEPTION_H__
+
++ #include <string.h>
+ #include <exception>
+ #include <string>
+
+*** misc/SampleICC-1.3.2/IccProfLib/IccCmm.cpp 2007-08-20 22:05:00.000000000 +0200
+--- misc/build/SampleICC-1.3.2/IccProfLib/IccCmm.cpp 2008-01-31 13:49:54.000000000 +0100
+***************
+*** 79,84 ****
+--- 79,86 ----
+ #pragma warning( disable: 4786) //disable warning in <list.h>
+ #endif
+
++ #include <stdlib.h>
++ #include <string.h>
+ #include "IccCmm.h"
+ #include "IccTag.h"
+ #include "IccIO.h"
+*** misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h 2007-08-20 22:04:53.000000000 +0200
+--- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h 2008-01-31 14:05:58.000000000 +0100
+***************
+*** 83,88 ****
+--- 83,89 ----
+ #include <string>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++ #include <stdlib.h>
+
+ #ifdef WIN32
+ typedef unsigned short mode_t;
diff --git a/icc/makefile.mk b/icc/makefile.mk
new file mode 100644
index 000000000000..87ebf3aeb577
--- /dev/null
+++ b/icc/makefile.mk
@@ -0,0 +1,58 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=.
+
+PRJNAME=icc
+TARGET=icc
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+# --- Files --------------------------------------------------------
+
+TARFILE_NAME=SampleICC-1.3.2
+TARFILE_MD5=fdb27bfe2dbe2e7b57ae194d9bf36bab
+PATCH_FILES=$(TARFILE_NAME).patch
+
+CONVERTFILES= \
+ IccProfLib$/IccTagProfSeqId.h \
+ IccProfLib$/IccTagProfSeqId.cpp \
+ Contrib$/ICC_utils$/Stubs.h \
+ Contrib$/ICC_utils$/Vetters.cpp
+
+CONFIGURE_ACTION= $(GNUCOPY) -r $(BACK_PATH)..$/source$/create_sRGB_profile Contrib$/CmdLine && unzip -o $(BACK_PATH)..$/makefiles.zip
+BUILD_ACTION=dmake && cd Contrib$/CmdLine$/create_sRGB_profile && $(AUGMENT_LIBRARY_PATH) .$/create_sRGB_profile
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : set_ext.mk
+.INCLUDE : target.mk
+.INCLUDE : tg_ext.mk
+
+
diff --git a/icc/makefiles.zip b/icc/makefiles.zip
new file mode 100644
index 000000000000..db08c73a206b
--- /dev/null
+++ b/icc/makefiles.zip
Binary files differ
diff --git a/icc/prj/build.lst b/icc/prj/build.lst
new file mode 100644
index 000000000000..9eace5df121a
--- /dev/null
+++ b/icc/prj/build.lst
@@ -0,0 +1,3 @@
+ip icc : solenv stlport external sal NULL
+ip icc usr1 - all ip_mkout NULL
+ip icc nmake - all ip_icc NULL
diff --git a/icc/prj/d.lst b/icc/prj/d.lst
new file mode 100644
index 000000000000..864e9473792b
--- /dev/null
+++ b/icc/prj/d.lst
@@ -0,0 +1,5 @@
+mkdir: %_DEST%\inc%_EXT%\icc
+mkdir: %_DEST%\inc%_EXT%\external\icc
+
+..\%__SRC%\misc\build\SampleICC*\Contrib\CmdLine\create_sRGB_profile\sRGB*.hxx %_DEST%\inc%_EXT%\icc\sRGB*.hxx
+
diff --git a/icc/source/create_sRGB_profile/Makefile.am b/icc/source/create_sRGB_profile/Makefile.am
new file mode 100644
index 000000000000..a2d588886e9c
--- /dev/null
+++ b/icc/source/create_sRGB_profile/Makefile.am
@@ -0,0 +1,13 @@
+## Process this file with automake to produce Makefile.in
+
+bin_PROGRAMS = \
+ create_display_profile
+
+INCLUDES = -I$(top_builddir) -I$(top_srcdir)/IccProfLib \
+ -I$(top_srcdir)/Contrib/ICC_utils
+
+LDADD = -L$(top_builddir)/IccProfLib -lSampleICC \
+ -L$(top_builddir)/Contrib/ICC_utils -lICC_utils
+
+create_display_profile_SOURCES = \
+ create_display_profile.cpp
diff --git a/icc/source/create_sRGB_profile/Makefile.in b/icc/source/create_sRGB_profile/Makefile.in
new file mode 100644
index 000000000000..5745b7ad5a48
--- /dev/null
+++ b/icc/source/create_sRGB_profile/Makefile.in
@@ -0,0 +1,378 @@
+# Makefile.in generated by automake 1.6.3 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../../..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = @program_transform_name@
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+host_alias = @host_alias@
+host_triplet = @host@
+
+EXEEXT = @EXEEXT@
+OBJEXT = @OBJEXT@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+AMTAR = @AMTAR@
+AM_CFLAGS = @AM_CFLAGS@
+AM_CXXFLAGS = @AM_CXXFLAGS@
+AR = @AR@
+AS = @AS@
+AWK = @AWK@
+CC = @CC@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+ECHO = @ECHO@
+EGREP = @EGREP@
+F77 = @F77@
+GCJ = @GCJ@
+GCJFLAGS = @GCJFLAGS@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_VERSION = @LIBTOOL_VERSION@
+LN_S = @LN_S@
+MAINT = @MAINT@
+OBJDUMP = @OBJDUMP@
+PACKAGE = @PACKAGE@
+RANLIB = @RANLIB@
+RC = @RC@
+SAMPLEICC_VERSION = @SAMPLEICC_VERSION@
+SICC_ICC_APPLY_PROFILES = @SICC_ICC_APPLY_PROFILES@
+STRIP = @STRIP@
+TIFF_CPPFLAGS = @TIFF_CPPFLAGS@
+TIFF_LDFLAGS = @TIFF_LDFLAGS@
+TIFF_LIBS = @TIFF_LIBS@
+VERSION = @VERSION@
+am__include = @am__include@
+am__quote = @am__quote@
+install_sh = @install_sh@
+
+bin_PROGRAMS = \
+ create_sRGB_profile
+
+
+INCLUDES = -I$(top_builddir) -I$(top_srcdir)/IccProfLib \
+ -I$(top_srcdir)/Contrib/ICC_utils
+
+
+LDADD = -L$(top_builddir)/IccProfLib -lSampleICC \
+ -L$(top_builddir)/Contrib/ICC_utils -lICC_utils
+
+
+create_sRGB_profile_SOURCES = \
+ create_sRGB_profile.cpp
+
+subdir = Contrib/CmdLine/create_sRGB_profile
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_CLEAN_FILES =
+bin_PROGRAMS = create_sRGB_profile$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
+
+am_create_sRGB_profile_OBJECTS = create_sRGB_profile.$(OBJEXT)
+create_sRGB_profile_OBJECTS = $(am_create_sRGB_profile_OBJECTS)
+create_sRGB_profile_LDADD = $(LDADD)
+create_sRGB_profile_DEPENDENCIES =
+create_sRGB_profile_LDFLAGS =
+
+DEFS = @DEFS@
+DEFAULT_INCLUDES = -I. -I$(srcdir)
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/create_sRGB_profile.Po
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+CXXFLAGS = @CXXFLAGS@
+DIST_SOURCES = $(create_sRGB_profile_SOURCES)
+DIST_COMMON = Makefile.am Makefile.in
+SOURCES = $(create_sRGB_profile_SOURCES)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Contrib/CmdLine/create_sRGB_profile/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ if test -f $$p \
+ || test -f $$p1 \
+ ; then \
+ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f; \
+ else :; fi; \
+ done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
+ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+ rm -f $(DESTDIR)$(bindir)/$$f; \
+ done
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; for p in $$list; do \
+ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f $$p $$f"; \
+ rm -f $$p $$f ; \
+ done
+create_sRGB_profile$(EXEEXT): $(create_sRGB_profile_OBJECTS) $(create_sRGB_profile_DEPENDENCIES)
+ @rm -f create_sRGB_profile$(EXEEXT)
+ $(CXXLINK) $(create_sRGB_profile_LDFLAGS) $(create_sRGB_profile_OBJECTS) $(create_sRGB_profile_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/create_sRGB_profile.Po@am__quote@
+
+distclean-depend:
+ -rm -rf ./$(DEPDIR)
+
+.cpp.o:
+@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(CXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+
+.cpp.obj:
+@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(CXXCOMPILE) -c -o $@ `cygpath -w $<`
+
+.cpp.lo:
+@AMDEP_TRUE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
+@AMDEP_TRUE@ $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ $(LTCXXCOMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
+CXXDEPMODE = @CXXDEPMODE@
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+uninstall-info-am:
+
+ETAGS = etags
+ETAGSFLAGS =
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(ETAGS_ARGS)$$tags$$unique" \
+ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ../../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+ @list='$(DISTFILES)'; for file in $$list; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ dir="/$$dir"; \
+ $(mkinstalldirs) "$(distdir)$$dir"; \
+ else \
+ dir=''; \
+ fi; \
+ if test -d $$d/$$file; then \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
+
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+
+distclean-am: clean-am distclean-compile distclean-depend \
+ distclean-generic distclean-libtool distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+
+.PHONY: GTAGS all all-am check check-am clean clean-binPROGRAMS \
+ clean-generic clean-libtool distclean distclean-compile \
+ distclean-depend distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am info info-am install \
+ install-am install-binPROGRAMS install-data install-data-am \
+ install-exec install-exec-am install-info install-info-am \
+ install-man install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool tags uninstall uninstall-am \
+ uninstall-binPROGRAMS uninstall-info-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/icc/source/create_sRGB_profile/create_sRGB_profile.cpp b/icc/source/create_sRGB_profile/create_sRGB_profile.cpp
new file mode 100644
index 000000000000..f99c1b1edf43
--- /dev/null
+++ b/icc/source/create_sRGB_profile/create_sRGB_profile.cpp
@@ -0,0 +1,551 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+
+ Derived by beppec56@openoffice.org from various examples
+ in SampleICC library, the original copyright retained.
+
+ Copyright: see below
+*/
+
+/*
+ * The ICC Software License, Version 0.1
+ *
+ *
+ * Copyright (c) 2003-2006 The International Color Consortium. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ * if any, must include the following acknowledgment:
+ * "This product includes software developed by the
+ * The International Color Consortium (www.color.org)"
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "ICC" and "The International Color Consortium" must
+ * not be used to imply that the ICC organization endorses or
+ * promotes products derived from this software without prior
+ * written permission. For written permission, please see
+ * <http://www.color.org/>.
+ *
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
+ * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the The International Color Consortium.
+ *
+ *
+ * Membership in the ICC is encouraged when this software is used for
+ * commercial purposes.
+ *
+ *
+ * For more information on The International Color Consortium, please
+ * see <http://www.color.org/>.
+ *
+ *
+ */
+
+#include <math.h>
+#include <iostream>
+#include <fstream>
+using namespace std;
+
+#include "IccUtil.h"
+#include "IccProfile.h"
+
+#include "Vetters.h"
+#include "CAT.h"
+#include "CLUT.h"
+
+const char * const icc_file_name = "sRGB-IEC61966-2.1.icc";
+const char * const hxx_file_name = "sRGB-IEC61966-2.1.hxx";
+const char * const this_file_name_and_location =" * icc/source/create_sRGB_profile/create_sRGB_profile.cpp";
+
+const char* const description = "sRGB IEC61966-2.1";
+//const char* const devicemanufact = "IEC http://www.iec.ch"; not used, device manufactured by OOo seems funny...
+const char* const devicemodel = "IEC 61966-2.1 Default RGB colour space - sRGB";
+const char* const copyright = "The Contents of this file are made available subject to the terms of GNU Lesser General Public License version 3";
+
+// the creation date is fixed, corresponds to the last time this file has been changed
+// NOTE: change this date values whenever the data inside the profile are changed.
+const int data_last_changed_year = 2007;
+const int data_last_changed_month = 12;
+const int data_last_day = 12;
+const int data_last_changed_hour = 18;
+const int data_last_changed_minute = 32;
+
+// the following string array it's the standard OOo header format
+const char * const TheHeader1[] =
+{
+ "/*************************************************************************",
+ " *",
+ " * OpenOffice.org - a multi-platform office productivity suite",
+ " *",
+ " * sRGB-IEC61966-2.1.hxx",
+ " *",
+ " * creator: create_sRGB_profile",
+ NULL
+};
+
+const char * const TheHeader2[] =
+{
+ " *",
+ " * This file is part of OpenOffice.org.",
+ " *",
+ " * OpenOffice.org is free software: you can redistribute it and/or modify",
+ " * it under the terms of the GNU Lesser General Public License version 3",
+ " * only, as published by the Free Software Foundation.",
+ " *",
+ " * OpenOffice.org is distributed in the hope that it will be useful,",
+ " * but WITHOUT ANY WARRANTY; without even the implied warranty of",
+ " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the",
+ " * GNU Lesser General Public License version 3 for more details",
+ " * (a copy is included in the LICENSE file that accompanied this code).",
+ " *",
+ " * You should have received a copy of the GNU Lesser General Public License",
+ " * version 3 along with OpenOffice.org. If not, see",
+ " * <http://www.openoffice.org/license.html>",
+ " * for a copy of the LGPLv3 License.",
+ " *",
+ " ************************************************************************/",
+ "",
+ "#ifndef INCLUDED_ICC_SRGB_IEC61966_2_1_H",
+ "#define INCLUDED_ICC_SRGB_IEC61966_2_1_H",
+ "",
+ "/***********************************************************************",
+ " * NOTE:",
+ " * this file is automatically generated by running the program",
+ " * obtained building:",
+ this_file_name_and_location,
+ " * contained in module icc",
+ " * modify that program if you need to change something.",
+ " ***********************************************************************/",
+ NULL // last string, a null
+};
+
+const char * const TheTail[] =
+{
+ "#endif /* INCLUDED_ICC_SRGB_IEC61966_2_1_H */",
+ NULL
+};
+
+icFloatNumber computeIEC_RGBtoXYZ( icFloatNumber indata )
+{
+ double retval = 0.0;
+ if(indata < 0.04045)
+ retval = indata/12.92;
+ else // apply the other conversion
+ retval = pow( (indata + 0.055)/1.055 , 2.4);
+
+ return retval;
+}
+
+icFloatNumber computeIEC_XYZtoRGB( icFloatNumber indata )
+{
+ icFloatNumber retval = 0.0;
+ if(indata < 0.0031308)
+ retval = indata*12.92;
+ else // apply the other conversion
+ retval = 1.055*pow( indata , icFloatNumber(1.0/2.4)) - 0.055;
+
+ // cout << retval << endl;
+ return retval;
+}
+
+void dumpTag(FILE *outfile, CIccProfile *pIcc, icTagSignature sig)
+{
+ CIccTag *pTag = pIcc->FindTag(sig);
+ char buf[64];
+ CIccInfo Fmt;
+
+ std::string contents;
+
+ if (pTag)
+ {
+ fprintf(outfile, "\nContents of %s tag (%s)\n", Fmt.GetTagSigName(sig), icGetSig(buf, sig));
+ fprintf(outfile,"Type: ");
+
+ if (pTag->IsArrayType()) fprintf(outfile, "Array of ");
+
+ fprintf(outfile, "%s\n", Fmt.GetTagTypeSigName(pTag->GetType()));
+ pTag->Describe(contents);
+ fwrite(contents.c_str(), contents.length(), 1, outfile);
+ }
+ else
+ fprintf(outfile, "Tag (%s) not found in profile\n", icGetSig(buf, sig));
+}
+
+void dumpProfile(FILE *outfile, const char * profileName)
+{
+ CIccProfile *pIcc;
+ std::string sReport;
+ icValidateStatus nStatus;
+
+ pIcc = OpenIccProfile(profileName);
+
+ if (!pIcc)
+ printf("Unable to open '%s'\n", profileName);
+ else
+ {
+ icHeader *pHdr = &pIcc->m_Header;
+ CIccInfo Fmt;
+ char buf[64];
+
+ fprintf(outfile,"Profile: '%s'\n", profileName);
+ if(Fmt.IsProfileIDCalculated(&pHdr->profileID))
+ fprintf(outfile,"Profile ID: %s\n", Fmt.GetProfileID(&pHdr->profileID));
+ else
+ fprintf(outfile,"Profile ID: Profile ID not calculated.\n");
+ fprintf(outfile,"Size: %ld(0x%lx) bytes\n", pHdr->size, pHdr->size);
+
+ fprintf(outfile,"\nHeader\n");
+ fprintf(outfile,"------\n");
+ fprintf(outfile,"Attributes: %s\n", Fmt.GetDeviceAttrName(pHdr->attributes));
+ fprintf(outfile,"Cmm: %s\n", Fmt.GetCmmSigName((icCmmSignature)(pHdr->cmmId)));
+ fprintf(outfile,"Creation Date: %d/%d/%d %02u:%02u:%02u\n",
+ pHdr->date.month, pHdr->date.day, pHdr->date.year,
+ pHdr->date.hours, pHdr->date.minutes, pHdr->date.seconds);
+ fprintf(outfile,"Creator: %s\n", icGetSig(buf, pHdr->creator));
+ fprintf(outfile,"Data Color Space: %s\n", Fmt.GetColorSpaceSigName(pHdr->colorSpace));
+ fprintf(outfile,"Flags %s\n", Fmt.GetProfileFlagsName(pHdr->flags));
+ fprintf(outfile,"PCS Color Space: %s\n", Fmt.GetColorSpaceSigName(pHdr->pcs));
+ fprintf(outfile,"Platform: %s\n", Fmt.GetPlatformSigName(pHdr->platform));
+ fprintf(outfile,"Rendering Intent: %s\n", Fmt.GetRenderingIntentName((icRenderingIntent)(pHdr->renderingIntent)));
+ fprintf(outfile,"Type: %s\n", Fmt.GetProfileClassSigName(pHdr->deviceClass));
+ fprintf(outfile,"Version: %s\n", Fmt.GetVersionName(pHdr->version));
+ fprintf(outfile,"Illuminant: X=%.4lf, Y=%.4lf, Z=%.4lf\n",
+ icFtoD(pHdr->illuminant.X),
+ icFtoD(pHdr->illuminant.Y),
+ icFtoD(pHdr->illuminant.Z));
+
+ fprintf(outfile,"\nProfile Tags\n");
+ fprintf(outfile,"------------\n");
+
+ fprintf(outfile,"%25s ID %8s\t%8s\n", "Tag", "Offset", "Size");
+ fprintf(outfile,"%25s ------ %8s\t%8s\n", "----", "------", "----");
+
+ int n;
+ TagEntryList::iterator i;
+
+ for (n=0, i=pIcc->m_Tags->begin(); i!=pIcc->m_Tags->end(); i++, n++)
+ {
+ fprintf(outfile,"%25s %s %8ld\t%8ld\n", Fmt.GetTagSigName(i->TagInfo.sig),
+ icGetSig(buf, i->TagInfo.sig, false),
+ i->TagInfo.offset, i->TagInfo.size);
+ }
+
+ for (n=0, i=pIcc->m_Tags->begin(); i!=pIcc->m_Tags->end(); i++, n++)
+ dumpTag(outfile, pIcc, i->TagInfo.sig);
+ }
+ delete pIcc;
+}
+
+int main(int argc, char* argv[])
+{
+ const char* myName = path_tail(argv[0]);
+
+ try
+ {
+ const char* const out_file_pathname = icc_file_name;
+
+ CIccProfile profile;
+ profile.InitHeader();
+
+ profile.m_Header.date.year = data_last_changed_year;
+ profile.m_Header.date.month = data_last_changed_month;
+ profile.m_Header.date.day = data_last_day;
+ profile.m_Header.date.hours = data_last_changed_hour;
+ profile.m_Header.date.minutes = data_last_changed_minute;
+ profile.m_Header.date.seconds = 0;
+
+ profile.m_Header.deviceClass = icSigDisplayClass;
+ profile.m_Header.colorSpace = icSigRgbData;
+ profile.m_Header.pcs = icSigXYZData;
+ profile.m_Header.platform = icSigUnkownPlatform;
+ profile.m_Header.attributes = static_cast<icUInt64Number>(icReflective);
+ profile.m_Header.renderingIntent = icPerceptual;
+
+ profile.m_Header.cmmId = 0x6E6F6E65; /* 'none' */
+ profile.m_Header.model = 0x73524742;//sRGB
+
+ profile.m_Header.version=icVersionNumberV2_1;
+
+ // Required tags for a three-component matrix-based display profile, as laid
+ // out by specification ICC.1:1998-09 (clause 6.3) are:
+ //
+ // copyrightTag
+ // profileDescriptionTag
+ // redMatrixColumnTag
+ // greenMatrixColumnTag
+ // blueMatrixColumnTag
+ // redTRCTag
+ // greenTRCTag
+ // blueTRCTag
+ // mediaWhitePointTag
+
+ // the other tags:
+ //
+ // technologyTag
+ // deviceModelTag
+ // deviceMfgDescTag
+ // mediaBlackPointTag
+ // viewingCondDescTag
+ // viewingConditionsTag
+ // luminanceTag
+ // measurementTag
+ //
+ // are optionals, added for completeness
+
+ // the element below are sorted in the same order as
+ // the list above, but the LUT table,
+ // embedded at the end of the profile
+
+ // copyrightTag
+ CIccTagText* copyrightTag = new CIccTagText;
+ copyrightTag->SetText(copyright);
+ profile.AttachTag(icSigCopyrightTag, copyrightTag);
+
+ // profileDescriptionTag
+ CIccTagTextDescription* descriptionTag = new CIccTagTextDescription;
+ descriptionTag->SetText(description);
+ profile.AttachTag(icSigProfileDescriptionTag, descriptionTag);
+
+ CIccTagXYZ* redMatrixColumnTag = new CIccTagXYZ;
+ //values from raccomandation of ICC for sRGB, D50 referenced characterisation data
+ //should be: 0.4361, 0.2225, 0.0139 according to application notes,
+ // the 'X' value below is the one commonly in use on a very
+ // diffused sRGB profile
+ (*redMatrixColumnTag)[0].X = icDtoF(0.4361);
+ (*redMatrixColumnTag)[0].Y = icDtoF(0.2225);
+ (*redMatrixColumnTag)[0].Z = icDtoF(0.0139);
+ profile.AttachTag(icSigRedMatrixColumnTag, redMatrixColumnTag);
+
+ CIccTagXYZ* greenMatrixColumnTag = new CIccTagXYZ;
+ //values from raccomandation of ICC for sRGB, D50 referenced characterisation data
+ (*greenMatrixColumnTag)[0].X = icDtoF(0.3851);
+ (*greenMatrixColumnTag)[0].Y = icDtoF(0.7169);
+ (*greenMatrixColumnTag)[0].Z = icDtoF(0.0971);
+ profile.AttachTag(icSigGreenMatrixColumnTag, greenMatrixColumnTag);
+
+ CIccTagXYZ* blueMatrixColumnTag = new CIccTagXYZ;
+ //values from raccomandation of ICC for sRGB, D50 referenced characterisation data
+ //should be: 0.1431, 0.0606, 0.7139 according to application notes,
+ // the 'Z' value below is the one commonly in use on a very
+ // diffused sRGB profile
+ (*blueMatrixColumnTag)[0].X = icDtoF(0.1431);
+ (*blueMatrixColumnTag)[0].Y = icDtoF(0.0606);
+ (*blueMatrixColumnTag)[0].Z = icDtoF(0.7141);
+ profile.AttachTag(icSigBlueMatrixColumnTag, blueMatrixColumnTag);
+
+ // mediaWhitePointTag
+ CIccTagXYZ* whitePointTag = new CIccTagXYZ;
+ (*whitePointTag)[0].X = icDtoF(0.9505);
+ (*whitePointTag)[0].Y = icDtoF(1.0);
+ (*whitePointTag)[0].Z = icDtoF(1.0891);
+ profile.AttachTag(icSigMediaWhitePointTag, whitePointTag);
+
+ //device signature (technologytag)
+ CIccTagSignature* deviceSign = new CIccTagSignature;
+ deviceSign->SetValue( icSigCRTDisplay );
+ profile.AttachTag( icSigTechnologyTag, deviceSign );
+
+ //device model tag
+ CIccTagTextDescription* deviceModelTag = new CIccTagTextDescription;
+ deviceModelTag->SetText("IEC 61966-2.1 Default RGB colour space - sRGB");
+ profile.AttachTag( icSigDeviceModelDescTag, deviceModelTag);
+
+ // deviceMfgDescTag
+ CIccTagTextDescription* deviceMfgTag = new CIccTagTextDescription;
+ deviceMfgTag->SetText("IEC http://www.iec.ch");
+ profile.AttachTag( icSigDeviceMfgDescTag, deviceMfgTag);
+
+ // mediaBlackPointTag
+ CIccTagXYZ* blackPointTag = new CIccTagXYZ;
+ (*blackPointTag)[0].X =
+ (*blackPointTag)[0].Y =
+ (*blackPointTag)[0].Z = icDtoF(0.0);
+ profile.AttachTag(icSigMediaBlackPointTag, blackPointTag);
+
+ // viewingCondDescTag
+ CIccTagTextDescription* viewingCondDescTag = new CIccTagTextDescription;
+ viewingCondDescTag->SetText("Reference viewing condition according to IEC 61966-2.1");
+ profile.AttachTag( icSigViewingCondDescTag, viewingCondDescTag );
+
+ // viewingConditionsTag
+ CIccTagViewingConditions* viewingConditionsTag = new CIccTagViewingConditions;
+ // Illuminant tristimulus value
+ (*viewingConditionsTag).m_XYZIllum.X = icDtoF(19.6445);
+ (*viewingConditionsTag).m_XYZIllum.Y = icDtoF(20.3718);
+ (*viewingConditionsTag).m_XYZIllum.Z = icDtoF(16.8089);
+ // surround tristimulus value
+ (*viewingConditionsTag).m_XYZSurround.X = icDtoF(3.9289);
+ (*viewingConditionsTag).m_XYZSurround.Y = icDtoF(4.0744);
+ (*viewingConditionsTag).m_XYZSurround.Z = icDtoF(3.3618);
+ (*viewingConditionsTag).m_illumType = icIlluminantD50;
+ profile.AttachTag( icSigViewingConditionsType, viewingConditionsTag );
+
+ // luminanceTag
+ CIccTagXYZ* luminanceTag = new CIccTagXYZ;
+ (*luminanceTag)[0].X = icDtoF(76.0365);
+ (*luminanceTag)[0].Y = icDtoF(80.0);
+ (*luminanceTag)[0].Z = icDtoF(87.1246);
+ profile.AttachTag(icSigLuminanceTag, luminanceTag);
+
+ // measurementTag
+ CIccTagMeasurement* measurementTag = new CIccTagMeasurement;
+ (*measurementTag).m_Data.stdObserver = icStdObs1931TwoDegrees;
+ (*measurementTag).m_Data.backing.X =
+ (*measurementTag).m_Data.backing.Y =
+ (*measurementTag).m_Data.backing.Z = icDtoF(0.0);
+ (*measurementTag).m_Data.geometry = icGeometryUnknown;
+ // the flare is 1%, but the library doesn't seem all right with this
+ // see specification ICC.1:1998-09, clause 6.5.8, table 55 fot the right
+ // format of the data value
+ (*measurementTag).m_Data.flare = static_cast< icMeasurementFlare > ( icDtoUF( 0.01 ) );//means 1%
+ (*measurementTag).m_Data.illuminant = icIlluminantD65;
+ profile.AttachTag(icSigMeasurementTag, measurementTag );
+
+ // compute the LUT curves, they are equal for all three colors
+ // so only one LUT is computed and stored
+ int N = 1024; // number of points in LUTs
+ CIccTagCurve* colorTRCTag = new CIccTagCurve(N);
+ // apply conversion from RGB to XYZ, stepping the RGB value linearly from 0 to 100%
+ // 1024 steps are computed
+ for (int i = 0; i < N; ++i)
+ (*colorTRCTag)[i] = computeIEC_RGBtoXYZ( (icFloatNumber)i/(N-1));
+
+ profile.AttachTag(icSigRedTRCTag, colorTRCTag);
+ profile.AttachTag(icSigGreenTRCTag, colorTRCTag);
+ profile.AttachTag(icSigBlueTRCTag, colorTRCTag);
+
+ //Verify things
+ string validationReport;
+ icValidateStatus validationStatus = profile.Validate(validationReport);
+
+ switch (validationStatus)
+ {
+ case icValidateOK:
+ break;
+
+ case icValidateWarning:
+ clog << "Profile validation warning" << endl
+ << validationReport;
+ break;
+
+ case icValidateNonCompliant:
+ clog << "Profile non compliancy" << endl
+ << validationReport;
+ break;
+
+ case icValidateCriticalError:
+ default:
+ clog << "Profile Error" << endl
+ << validationReport;
+ }
+
+ // Out it goes
+ CIccFileIO out;
+ out.Open(out_file_pathname, "wb+");
+ profile.Write(&out);
+ out.Close();
+
+ FILE *headerfile = fopen(hxx_file_name,"w");
+
+ //print OpenOffice standard file header
+ const char *the_string;
+
+ int idx = 0;
+
+ while((the_string = TheHeader1[idx++]) != NULL )
+ fprintf(headerfile,"%s\n",the_string);
+// print the creation date (today)
+// print the date of sRGB ICC profile data
+ fprintf(headerfile," * the date of last change to sRGB ICC profile data is:\n * %4d/%02d/%02d - %02d:%02d\n",
+ data_last_changed_year, data_last_changed_month,
+ data_last_day, data_last_changed_hour,data_last_changed_minute );
+
+ idx = 0;
+
+ while((the_string = TheHeader2[idx++]) != NULL )
+ fprintf(headerfile,"%s\n",the_string);
+
+ {
+// spit out the data structure (an array of unsigned char)
+ FILE *infile;
+
+ int achar, number = 1;
+
+ infile = fopen(out_file_pathname,"rb");
+
+ fseek(infile,0,SEEK_END);
+ long int thesize= ftell(infile);
+ fseek(infile,0,SEEK_SET);
+
+ fprintf(headerfile,"\nsal_uInt8 nsRGB_ICC_profile[%d]=\n{\n ",thesize);
+
+ do
+ {
+ achar = fgetc(infile);
+ if(achar == EOF)
+ break;
+ fprintf(headerfile,"0x%02x",achar);
+ if(number % 12 == 0)
+ fprintf(headerfile,",\n ");
+ else
+ fprintf(headerfile,", ");
+ number++;
+ } while(achar != EOF );
+ fprintf(headerfile,"\n};\n\n");
+
+ fclose(infile);
+ }
+ // append the file contents, in human readable form, as comment in the header
+ // get the functions from iccDump
+
+ fprintf(headerfile,"/*****************\n\n");
+
+ fprintf(headerfile,"This ICC profile contains the following data:\n\n");
+
+ dumpProfile(headerfile, out_file_pathname );
+
+ fprintf(headerfile,"\n*****************/\n");
+ //now append the tail
+ idx = 0;
+ while((the_string = TheTail[idx++]) != NULL )
+ fprintf(headerfile,"%s\n",the_string);
+
+ fclose(headerfile);
+
+ return EXIT_SUCCESS;
+ }
+ catch (const std::exception& e)
+ {
+ cout << myName << ": error: " << e.what() << endl;
+ return EXIT_FAILURE;
+ }
+}