1 *** misc/SampleICC-1.3.2/configure Mon Aug 20 22:10:59 2007
2 --- misc/build/SampleICC-1.3.2/configure Fri Jan 25 14:23:09 2008
8 ! 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"
9 cat >confcache <<\_ACEOF
10 # This file is a shell script that caches the results of configure
11 # tests run on this system so they can be shared between configure
16 ! 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"
17 cat >confcache <<\_ACEOF
18 # This file is a shell script that caches the results of configure
19 # tests run on this system so they can be shared between configure
22 "IccProfLib/Makefile" ) CONFIG_FILES="$CONFIG_FILES IccProfLib/Makefile" ;;
23 "Tools/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/Makefile" ;;
24 "Tools/CmdLine/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/Makefile" ;;
25 - "Tools/CmdLine/IccApplyNamedCmm/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccApplyNamedCmm/Makefile" ;;
26 - "Tools/CmdLine/IccApplyProfiles/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccApplyProfiles/Makefile" ;;
27 "Tools/CmdLine/IccDumpProfile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccDumpProfile/Makefile" ;;
28 "Tools/CmdLine/IccProfLibTest/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccProfLibTest/Makefile" ;;
29 "Tools/CmdLine/IccStripUnknownTags/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccStripUnknownTags/Makefile" ;;
33 "Tools/CmdLine/IccV4ToMPE/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccV4ToMPE/Makefile" ;;
34 "Contrib/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Makefile" ;;
35 "Contrib/CmdLine/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/Makefile" ;;
36 ! "Contrib/CmdLine/create_CLUT_profile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_CLUT_profile/Makefile" ;;
37 ! "Contrib/CmdLine/create_CLUT_profile_from_probe/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_CLUT_profile_from_probe/Makefile" ;;
38 ! "Contrib/CmdLine/create_display_profile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_display_profile/Makefile" ;;
39 "Contrib/ICC_utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/ICC_utils/Makefile" ;;
40 - "Contrib/Mac_OS_X/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Mac_OS_X/Makefile" ;;
41 - "Contrib/Mac_OS_X/create_probe/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Mac_OS_X/create_probe/Makefile" ;;
42 - "Contrib/Mac_OS_X/extract_probe_data/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Mac_OS_X/extract_probe_data/Makefile" ;;
43 - "Contrib/examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/examples/Makefile" ;;
44 - "Contrib/examples/RSR/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/examples/RSR/Makefile" ;;
45 - "Contrib/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/Makefile" ;;
46 - "Contrib/tests/flatten_AToB_tag/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/flatten_AToB_tag/Makefile" ;;
47 - "Contrib/tests/generate_device_codes/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/generate_device_codes/Makefile" ;;
48 - "Contrib/tests/reconstruct_measurements/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/reconstruct_measurements/Makefile" ;;
49 - "Contrib/tests/round_trip_PCS_LAB/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/tests/round_trip_PCS_LAB/Makefile" ;;
50 "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
51 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
52 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
54 "Tools/CmdLine/IccV4ToMPE/Makefile" ) CONFIG_FILES="$CONFIG_FILES Tools/CmdLine/IccV4ToMPE/Makefile" ;;
55 "Contrib/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/Makefile" ;;
56 "Contrib/CmdLine/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/Makefile" ;;
57 ! "Contrib/CmdLine/create_sRGB_profile/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/CmdLine/create_sRGB_profile/Makefile" ;;
58 "Contrib/ICC_utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES Contrib/ICC_utils/Makefile" ;;
59 "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
60 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
61 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
62 *** misc/SampleICC-1.3.2/Contrib/Makefile.in Mon Aug 20 22:10:37 2007
63 --- misc/build/SampleICC-1.3.2/Contrib/Makefile.in Fri Jan 25 14:23:09 2008
83 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
96 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
97 *** misc/SampleICC-1.3.2/Contrib/CmdLine/Makefile.in Mon Aug 20 22:10:34 2007
98 --- misc/build/SampleICC-1.3.2/Contrib/CmdLine/Makefile.in Fri Jan 25 14:23:09 2008
101 install_sh = @install_sh@
104 ! create_CLUT_profile \
105 ! create_CLUT_profile_from_probe \
106 ! create_display_profile
110 ! create_CLUT_profile \
111 ! create_CLUT_profile_from_probe \
112 ! create_display_profile
114 subdir = Contrib/CmdLine
115 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
117 install_sh = @install_sh@
120 ! create_sRGB_profile
124 ! create_sRGB_profile
126 subdir = Contrib/CmdLine
127 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
128 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/Makefile.in Mon Aug 20 22:10:35 2007
129 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Makefile.in Fri Jan 25 14:23:09 2008
133 LTLIBRARIES = $(lib_LTLIBRARIES)
135 ! libICC_utils_la_LIBADD =
136 am_libICC_utils_la_OBJECTS = Stubs.lo CAT.lo CLUT.lo CLUT_stuffer.lo \
137 ICC_tool_exception.lo Vetters.lo
138 libICC_utils_la_OBJECTS = $(am_libICC_utils_la_OBJECTS)
141 LTLIBRARIES = $(lib_LTLIBRARIES)
143 ! libICC_utils_la_LIBADD = $(LDADD)
144 am_libICC_utils_la_OBJECTS = Stubs.lo CAT.lo CLUT.lo CLUT_stuffer.lo \
145 ICC_tool_exception.lo Vetters.lo
146 libICC_utils_la_OBJECTS = $(am_libICC_utils_la_OBJECTS)
147 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/Stubs.h Mon Aug 20 22:04:53 2007
148 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Stubs.h Fri Jan 25 14:23:09 2008
152 // use one of these to force desired sort order in assoc. containers of DPX
154 ! DPX::operator<(const DPX& p) const
156 return (r_ != p.r_) ? (r_ < p.r_) : ((g_ != p.g_) ? (g_ < p.g_) : (b_ < p.b_));
160 // use one of these to force desired sort order in assoc. containers of DPX
162 ! operator<(const DPX& p) const
164 return (r_ != p.r_) ? (r_ < p.r_) : ((g_ != p.g_) ? (g_ < p.g_) : (b_ < p.b_));
166 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.cpp Mon Aug 20 22:04:54 2007
167 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.cpp Fri Jan 25 14:57:06 2008
173 ! Contains: Utility functions to handle common argument-checking tasks, in a
174 ! way that hides platform-specific details from higher-level code.
178 ! Copyright: © see below
182 ! * The ICC Software License, Version 0.1
185 ! * Copyright (c) 2003-2006 The International Color Consortium. All rights
188 ! * Redistribution and use in source and binary forms, with or without
189 ! * modification, are permitted provided that the following conditions
192 ! * 1. Redistributions of source code must retain the above copyright
193 ! * notice, this list of conditions and the following disclaimer.
195 ! * 2. Redistributions in binary form must reproduce the above copyright
196 ! * notice, this list of conditions and the following disclaimer in
197 ! * the documentation and/or other materials provided with the
200 ! * 3. The end-user documentation included with the redistribution,
201 ! * if any, must include the following acknowledgment:
202 ! * "This product includes software developed by the
203 ! * The International Color Consortium (www.color.org)"
204 ! * Alternately, this acknowledgment may appear in the software itself,
205 ! * if and wherever such third-party acknowledgments normally appear.
207 ! * 4. The names "ICC" and "The International Color Consortium" must
208 ! * not be used to imply that the ICC organization endorses or
209 ! * promotes products derived from this software without prior
210 ! * written permission. For written permission, please see
211 ! * <http://www.color.org/>.
214 ! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
215 ! * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
216 ! * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
217 ! * DISCLAIMED. IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
218 ! * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
219 ! * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
220 ! * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
221 ! * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
222 ! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
223 ! * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
224 ! * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
226 ! * ====================================================================
228 ! * This software consists of voluntary contributions made by many
229 ! * individuals on behalf of the The International Color Consortium.
232 ! * Membership in the ICC is encouraged when this software is used for
233 ! * commercial purposes.
236 ! * For more information on The International Color Consortium, please
237 ! * see <http://www.color.org/>.
242 ! //////////////////////////////////////////////////////////////////////
245 ! // -Initial implementation by Joseph Goldstone sumer 2007
247 ! //////////////////////////////////////////////////////////////////////
249 ! #include "Vetters.h"
252 ! using namespace std;
255 ! #include <sys/errno.h>
257 ! #include <string.h>
258 ! int strerror_r(int errnum, char *str, int strsize)
260 ! const char *errstr = strerror(errnum);
263 ! strncpy(str, errstr, strsize);
272 ! #include "ICC_tool_exception.h"
275 ! path_tail(const char* const s)
277 ! const char* tail = strdup(s);
278 ! const char* last_slash = strrchr(tail, '/');
279 ! if (last_slash != NULL)
280 ! tail = last_slash + 1;
285 ! vet_as_int(const char* const s, const string& name,
286 ! const string& description)
288 ! istringstream ss(s);
294 ! oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
295 ! << " an integer. It should be an integer representing "
296 ! << description << ".";
297 ! throw ICC_tool_exception(oss.str());
302 ! vet_as_float(const char* const s, const string& name,
303 ! const string& description)
305 ! istringstream ss(s);
311 ! oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
312 ! << " a floating-point number. It should be a floating-point number"
313 ! << " representing " << description << ".";
314 ! throw ICC_tool_exception(oss.str());
318 ! #define STRERROR_BUF_SIZE 256
320 ! get_size(const char* const s)
323 ! int stat_returned = stat(s, &sb);
324 ! if (stat_returned < 0)
326 ! int stat_errno = errno;
327 ! char strerror_buf[STRERROR_BUF_SIZE];
328 ! strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
330 ! oss << "Could not access information for file `" << s << "': "
332 ! throw ICC_tool_exception(oss.str());
338 ! check_mode(const char* const s, mode_t mode)
341 ! int stat_returned = stat(s, &sb);
342 ! if (stat_returned < 0)
344 ! int stat_errno = errno;
345 ! char strerror_buf[STRERROR_BUF_SIZE];
346 ! strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
348 ! oss << "Could not access information for file `" << s << "': "
350 ! throw ICC_tool_exception(oss.str());
352 ! return (sb.st_mode & mode) != 0;
356 ! is_existent_file_pathname(const char* const s)
359 ! return stat(s, &sb) == 0;
363 ! is_plain_file_pathname(const char* const s)
365 ! return check_mode(s, S_IFREG);
369 ! is_directory(const char* const s)
371 ! return check_mode(s, S_IFDIR);
375 ! containing_directory(const char* const s)
377 ! if (strlen(s) == 0)
378 ! throw ICC_tool_exception("name of directory passed to containing_directory"
379 ! " function was zero-length.");
380 ! char* tmp = strdup(s);
381 ! // lop off any trailing seperator
382 ! if (tmp[strlen(tmp) - 1] == '/')
383 ! tmp[strlen(tmp) - 1] = 0;
384 ! if (strlen(tmp) == 0)
385 ! throw ICC_tool_exception("root directory (which has no containing"
386 ! " directory) passed to containing_directory"
388 ! char* idx = strrchr(tmp, '/');
394 ! char* current_directory = getenv("PWD");
395 ! if (current_directory == NULL)
396 ! throw ICC_tool_exception("pathname passed to containing_directory has no"
397 ! " embedded seperator, and there is no value for"
398 ! " PWD defined in the environment");
399 ! return strdup(current_directory);
403 ! is_readable_pathname(const char* const s)
405 ! return check_mode(s, S_IRUSR)
406 ! || check_mode(s, S_IRGRP)
407 ! || check_mode(s, S_IROTH);
411 ! is_writable_pathname(const char* const s)
413 ! return check_mode(s, S_IWUSR)
414 ! || check_mode(s, S_IWGRP)
415 ! || check_mode(s, S_IWOTH);
419 ! is_pathname_of_empty_file(const char* const s)
421 ! return get_size(s) > 0;
425 ! vet_input_file_pathname(const char* const s, const string& name,
426 ! const string& description)
428 ! if (! is_plain_file_pathname(s))
431 ! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
432 ! << " of a plain file (i.e. it is the pathname of a directory, or of a"
433 ! << " symbolic link, or of some other sort of special file.) It should be"
434 ! << " " << description << ".";
435 ! throw ICC_tool_exception(oss.str());
437 ! if (! is_readable_pathname(s))
440 ! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
441 ! << " of a readable file (i.e. you do not have permission to read that"
442 ! << " file, or you do not have permission to read some directory"
443 ! << " containing that file.";
444 ! throw ICC_tool_exception(oss.str());
446 ! if (! is_pathname_of_empty_file(s))
449 ! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
450 ! << " of an existing readable file, but that file is of zero length."
451 ! << " The argument should be " << description << ".";
452 ! throw ICC_tool_exception(oss.str());
457 ! vet_output_file_pathname(const char* const s, const string& name,
458 ! const string& description,
459 ! bool silent_overwrite_OK)
461 ! const char* const container = containing_directory(s);
462 ! if (! is_writable_pathname(container))
465 ! oss << "The " << name << " argument given, `" << s << "', has a directory"
466 ! << " component which is not writable."
467 ! << " The argument should be " << description << ".";
468 ! throw ICC_tool_exception(oss.str());
470 ! if (is_existent_file_pathname(s))
472 ! if (is_plain_file_pathname(s))
473 ! if (is_writable_pathname(s))
475 ! if (! silent_overwrite_OK)
478 ! oss << "The " << name << " argument given, `" << s << "' is of an existing"
480 ! << " The argument should be " << description << ".";
481 ! throw ICC_tool_exception(oss.str());
485 ! oss << "The " << name << " argument given, `" << s << "' is of an existing"
486 ! << " file which is not writable."
487 ! << " The argument should be " << description << ".";
488 ! throw ICC_tool_exception(oss.str());
496 ! Contains: Utility functions to handle common argument-checking tasks, in a
497 ! way that hides platform-specific details from higher-level code.
501 ! Copyright: © see below
505 ! * The ICC Software License, Version 0.1
508 ! * Copyright (c) 2003-2006 The International Color Consortium. All rights
511 ! * Redistribution and use in source and binary forms, with or without
512 ! * modification, are permitted provided that the following conditions
515 ! * 1. Redistributions of source code must retain the above copyright
516 ! * notice, this list of conditions and the following disclaimer.
518 ! * 2. Redistributions in binary form must reproduce the above copyright
519 ! * notice, this list of conditions and the following disclaimer in
520 ! * the documentation and/or other materials provided with the
523 ! * 3. The end-user documentation included with the redistribution,
524 ! * if any, must include the following acknowledgment:
525 ! * "This product includes software developed by the
526 ! * The International Color Consortium (www.color.org)"
527 ! * Alternately, this acknowledgment may appear in the software itself,
528 ! * if and wherever such third-party acknowledgments normally appear.
530 ! * 4. The names "ICC" and "The International Color Consortium" must
531 ! * not be used to imply that the ICC organization endorses or
532 ! * promotes products derived from this software without prior
533 ! * written permission. For written permission, please see
534 ! * <http://www.color.org/>.
537 ! * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
538 ! * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
539 ! * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
540 ! * DISCLAIMED. IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
541 ! * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
542 ! * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
543 ! * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
544 ! * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
545 ! * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
546 ! * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
547 ! * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
549 ! * ====================================================================
551 ! * This software consists of voluntary contributions made by many
552 ! * individuals on behalf of the The International Color Consortium.
555 ! * Membership in the ICC is encouraged when this software is used for
556 ! * commercial purposes.
559 ! * For more information on The International Color Consortium, please
560 ! * see <http://www.color.org/>.
565 ! //////////////////////////////////////////////////////////////////////
568 ! // -Initial implementation by Joseph Goldstone sumer 2007
570 ! //////////////////////////////////////////////////////////////////////
572 ! #include "Vetters.h"
575 ! using namespace std;
580 ! #include <string.h>
584 ! #if defined WIN32 || defined sun
585 ! int strerror_r(int errnum, char *str, int strsize)
587 ! const char *errstr = strerror(errnum);
590 ! strncpy(str, errstr, strsize);
598 ! #include "ICC_tool_exception.h"
601 ! path_tail(const char* const s)
603 ! const char* tail = strdup(s);
604 ! const char* last_slash = strrchr(tail, '/');
605 ! if (last_slash != NULL)
606 ! tail = last_slash + 1;
611 ! vet_as_int(const char* const s, const string& name,
612 ! const string& description)
614 ! istringstream ss(s);
620 ! oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
621 ! << " an integer. It should be an integer representing "
622 ! << description << ".";
623 ! throw ICC_tool_exception(oss.str());
628 ! vet_as_float(const char* const s, const string& name,
629 ! const string& description)
631 ! istringstream ss(s);
637 ! oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
638 ! << " a floating-point number. It should be a floating-point number"
639 ! << " representing " << description << ".";
640 ! throw ICC_tool_exception(oss.str());
644 ! #define STRERROR_BUF_SIZE 256
646 ! get_size(const char* const s)
649 ! int stat_returned = stat(s, &sb);
650 ! if (stat_returned < 0)
652 ! int stat_errno = errno;
653 ! char strerror_buf[STRERROR_BUF_SIZE];
654 ! strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
656 ! oss << "Could not access information for file `" << s << "': "
658 ! throw ICC_tool_exception(oss.str());
664 ! check_mode(const char* const s, mode_t mode)
667 ! int stat_returned = stat(s, &sb);
668 ! if (stat_returned < 0)
670 ! int stat_errno = errno;
671 ! char strerror_buf[STRERROR_BUF_SIZE];
672 ! strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
674 ! oss << "Could not access information for file `" << s << "': "
676 ! throw ICC_tool_exception(oss.str());
678 ! return (sb.st_mode & mode) != 0;
682 ! is_existent_file_pathname(const char* const s)
685 ! return stat(s, &sb) == 0;
689 ! is_plain_file_pathname(const char* const s)
691 ! return check_mode(s, S_IFREG);
695 ! is_directory(const char* const s)
697 ! return check_mode(s, S_IFDIR);
701 ! containing_directory(const char* const s)
703 ! if (strlen(s) == 0)
704 ! throw ICC_tool_exception("name of directory passed to containing_directory"
705 ! " function was zero-length.");
706 ! char* tmp = strdup(s);
707 ! // lop off any trailing seperator
708 ! if (tmp[strlen(tmp) - 1] == '/')
709 ! tmp[strlen(tmp) - 1] = 0;
710 ! if (strlen(tmp) == 0)
711 ! throw ICC_tool_exception("root directory (which has no containing"
712 ! " directory) passed to containing_directory"
714 ! char* idx = strrchr(tmp, '/');
720 ! char* current_directory = getenv("PWD");
721 ! if (current_directory == NULL)
722 ! throw ICC_tool_exception("pathname passed to containing_directory has no"
723 ! " embedded seperator, and there is no value for"
724 ! " PWD defined in the environment");
725 ! return strdup(current_directory);
729 ! is_readable_pathname(const char* const s)
731 ! return check_mode(s, S_IRUSR)
732 ! || check_mode(s, S_IRGRP)
733 ! || check_mode(s, S_IROTH);
737 ! is_writable_pathname(const char* const s)
739 ! return check_mode(s, S_IWUSR)
740 ! || check_mode(s, S_IWGRP)
741 ! || check_mode(s, S_IWOTH);
745 ! is_pathname_of_empty_file(const char* const s)
747 ! return get_size(s) > 0;
751 ! vet_input_file_pathname(const char* const s, const string& name,
752 ! const string& description)
754 ! if (! is_plain_file_pathname(s))
757 ! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
758 ! << " of a plain file (i.e. it is the pathname of a directory, or of a"
759 ! << " symbolic link, or of some other sort of special file.) It should be"
760 ! << " " << description << ".";
761 ! throw ICC_tool_exception(oss.str());
763 ! if (! is_readable_pathname(s))
766 ! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
767 ! << " of a readable file (i.e. you do not have permission to read that"
768 ! << " file, or you do not have permission to read some directory"
769 ! << " containing that file.";
770 ! throw ICC_tool_exception(oss.str());
772 ! if (! is_pathname_of_empty_file(s))
775 ! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
776 ! << " of an existing readable file, but that file is of zero length."
777 ! << " The argument should be " << description << ".";
778 ! throw ICC_tool_exception(oss.str());
783 ! vet_output_file_pathname(const char* const s, const string& name,
784 ! const string& description,
785 ! bool silent_overwrite_OK)
787 ! const char* const container = containing_directory(s);
788 ! if (! is_writable_pathname(container))
791 ! oss << "The " << name << " argument given, `" << s << "', has a directory"
792 ! << " component which is not writable."
793 ! << " The argument should be " << description << ".";
794 ! throw ICC_tool_exception(oss.str());
796 ! if (is_existent_file_pathname(s))
798 ! if (is_plain_file_pathname(s))
799 ! if (is_writable_pathname(s))
801 ! if (! silent_overwrite_OK)
804 ! oss << "The " << name << " argument given, `" << s << "' is of an existing"
806 ! << " The argument should be " << description << ".";
807 ! throw ICC_tool_exception(oss.str());
811 ! oss << "The " << name << " argument given, `" << s << "' is of an existing"
812 ! << " file which is not writable."
813 ! << " The argument should be " << description << ".";
814 ! throw ICC_tool_exception(oss.str());
818 *** misc/SampleICC-1.3.2/IccProfLib/IccIO.cpp Mon Aug 20 22:05:00 2007
819 --- misc/build/SampleICC-1.3.2/IccProfLib/IccIO.cpp Fri Jan 25 14:23:09 2008
825 ! #include <memory.h>
837 *** misc/SampleICC-1.3.2/IccProfLib/IccIO.h Mon Aug 20 22:05:00 2007
838 --- misc/build/SampleICC-1.3.2/IccProfLib/IccIO.h Fri Jan 25 14:23:09 2008
848 #ifdef USESAMPLEICCNAMESPACE
849 *** misc/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp Mon Aug 20 22:05:00 2007
850 --- misc/build/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp Fri Jan 25 14:23:09 2008
856 ! sDescription += "ELEM_bACS\r\n";
858 ! sDescription += "ELEM_eACS\r\n";
860 icGetSig(sigBuf, m_signature);
861 sDescription += " Signature = ";
862 sDescription += sigBuf;
863 ! sDescription += "\r\n";
866 ! sDescription += "\r\nData Follows:\r\n";
868 icMemDump(sDescription, m_pData, m_nDataSize);
874 ! sDescription += "ELEM_bACS\n";
876 ! sDescription += "ELEM_eACS\n";
878 icGetSig(sigBuf, m_signature);
879 sDescription += " Signature = ";
880 sDescription += sigBuf;
881 ! sDescription += "\n";
884 ! sDescription += "\nData Follows:\n";
886 icMemDump(sDescription, m_pData, m_nDataSize);
888 *** misc/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp Mon Aug 20 22:05:00 2007
889 --- misc/build/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp Fri Jan 25 14:23:09 2008
892 sprintf(buf, "%.8f", m_endPoint);
895 ! sprintf(buf, "]\r\nFunctionType: %04Xh\r\n", m_nFunctionType);
898 switch(m_nFunctionType) {
900 if (m_params[1]==0.0 && m_params[2]==0.0)
901 ! sprintf(buf, "Y = %.8f\r\n\r\n", m_params[3]);
902 else if (m_params[0]==1.0 && m_params[1]==1.0 && m_params[2]==0.0 && m_params[3]==0.0)
903 ! sprintf(buf, "Y = X\r\n\r\n");
904 else if (m_params[0]==1.0 && m_params[2]==0.0)
905 ! sprintf(buf, "Y = %.8f * X + %.8f\r\n\r\n",
906 m_params[1], m_params[3]);
908 ! sprintf(buf, "Y = (%.8f * X + %.8f)^%.4f + %.8f\r\n\r\n",
909 m_params[1], m_params[2], m_params[0], m_params[3]);
914 ! sprintf(buf, "Y = %.8f * log (%.8f * (X ^ %.8f) + %.8f) + %.8f\r\n\r\n",
915 m_params[1], m_params[2], m_params[0], m_params[3], m_params[4]);
920 ! sprintf(buf, "Y = %.8f * (%.8f ^ (%.8f * X + %.8f)) + %.8f\r\n\r\n",
921 m_params[0], m_params[1], m_params[2], m_params[3], m_params[4]);
925 sprintf(buf, "%.8f", m_endPoint);
928 ! sprintf(buf, "]\nFunctionType: %04Xh\n", m_nFunctionType);
931 switch(m_nFunctionType) {
933 if (m_params[1]==0.0 && m_params[2]==0.0)
934 ! sprintf(buf, "Y = %.8f\n\n", m_params[3]);
935 else if (m_params[0]==1.0 && m_params[1]==1.0 && m_params[2]==0.0 && m_params[3]==0.0)
936 ! sprintf(buf, "Y = X\n\n");
937 else if (m_params[0]==1.0 && m_params[2]==0.0)
938 ! sprintf(buf, "Y = %.8f * X + %.8f\n\n",
939 m_params[1], m_params[3]);
941 ! sprintf(buf, "Y = (%.8f * X + %.8f)^%.4f + %.8f\n\n",
942 m_params[1], m_params[2], m_params[0], m_params[3]);
947 ! sprintf(buf, "Y = %.8f * log (%.8f * (X ^ %.8f) + %.8f) + %.8f\n\n",
948 m_params[1], m_params[2], m_params[0], m_params[3], m_params[4]);
953 ! sprintf(buf, "Y = %.8f * (%.8f ^ (%.8f * X + %.8f)) + %.8f\n\n",
954 m_params[0], m_params[1], m_params[2], m_params[3], m_params[4]);
962 ! sprintf(buf, "Unknown Function with %d parameters:\r\n\r\n", m_nParameters);
965 for (i=0; i<m_nParameters; i++) {
966 ! sprintf(buf, "Param[%d] = %.8lf\r\n\r\n", i, m_params[i]);
974 ! sprintf(buf, "Unknown Function with %d parameters:\n\n", m_nParameters);
977 for (i=0; i<m_nParameters; i++) {
978 ! sprintf(buf, "Param[%d] = %.8lf\n\n", i, m_params[i]);
984 if (m_nReserved || m_nReserved2) {
985 sReport += icValidateWarningMsg;
987 ! sReport += " formula curve has non zero reserved data.\r\n";
988 rv = icValidateWarning;
992 if (m_nReserved || m_nReserved2) {
993 sReport += icValidateWarningMsg;
995 ! sReport += " formula curve has non zero reserved data.\n";
996 rv = icValidateWarning;
1001 if (!m_params || m_nParameters<4) {
1002 sReport += icValidateCriticalErrorMsg;
1003 sReport += sSigName;
1004 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
1005 rv = icValidateCriticalError;
1007 else if (m_nParameters > 4) {
1008 sReport += icValidateWarningMsg;
1009 sReport += sSigName;
1010 ! sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
1011 rv = icValidateWarning;
1015 if (!m_params || m_nParameters<4) {
1016 sReport += icValidateCriticalErrorMsg;
1017 sReport += sSigName;
1018 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
1019 rv = icValidateCriticalError;
1021 else if (m_nParameters > 4) {
1022 sReport += icValidateWarningMsg;
1023 sReport += sSigName;
1024 ! sReport += " formula curve has too many formulaCurveSegment parameters.\n";
1025 rv = icValidateWarning;
1030 if (!m_params || m_nParameters<5) {
1031 sReport += icValidateCriticalErrorMsg;
1032 sReport += sSigName;
1033 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
1034 rv = icValidateCriticalError;
1036 else if (m_nParameters > 5) {
1037 sReport += icValidateWarningMsg;
1038 sReport += sSigName;
1039 ! sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
1040 rv = icValidateWarning;
1044 if (!m_params || m_nParameters<5) {
1045 sReport += icValidateCriticalErrorMsg;
1046 sReport += sSigName;
1047 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
1048 rv = icValidateCriticalError;
1050 else if (m_nParameters > 5) {
1051 sReport += icValidateWarningMsg;
1052 sReport += sSigName;
1053 ! sReport += " formula curve has too many formulaCurveSegment parameters.\n";
1054 rv = icValidateWarning;
1059 if (!m_params || m_nParameters<5) {
1060 sReport += icValidateCriticalErrorMsg;
1061 sReport += sSigName;
1062 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
1063 rv = icValidateCriticalError;
1065 else if (m_nParameters > 5) {
1066 sReport += icValidateWarningMsg;
1067 sReport += sSigName;
1068 ! sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
1069 rv = icValidateWarning;
1073 if (!m_params || m_nParameters<5) {
1074 sReport += icValidateCriticalErrorMsg;
1075 sReport += sSigName;
1076 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
1077 rv = icValidateCriticalError;
1079 else if (m_nParameters > 5) {
1080 sReport += icValidateWarningMsg;
1081 sReport += sSigName;
1082 ! sReport += " formula curve has too many formulaCurveSegment parameters.\n";
1083 rv = icValidateWarning;
1089 sReport += icValidateCriticalErrorMsg;
1090 sReport += sSigName;
1091 ! sprintf(buf, " formula curve uses unknown formulaCurveSegment function type %d\r\n", m_nFunctionType);
1093 rv = icValidateCriticalError;
1097 sReport += icValidateCriticalErrorMsg;
1098 sReport += sSigName;
1099 ! sprintf(buf, " formula curve uses unknown formulaCurveSegment function type %d\n", m_nFunctionType);
1101 rv = icValidateCriticalError;
1105 sDescription += buf;
1108 ! sprintf(buf, "]\r\n");
1109 sDescription += buf;
1113 sDescription += buf;
1116 ! sprintf(buf, "]\n");
1117 sDescription += buf;
1122 sprintf(buf, "%.8f", m_endPoint);
1123 sDescription += buf;
1125 ! sprintf(buf, "]\r\n");
1126 sDescription += buf;
1127 ! sDescription += "IN OUT\r\n";
1132 sprintf(buf, "%.8f", m_endPoint);
1133 sDescription += buf;
1135 ! sprintf(buf, "]\n");
1136 sDescription += buf;
1137 ! sDescription += "IN OUT\n";
1143 icFloatNumber last = (icFloatNumber)(m_nCount-1);
1145 for (i=0; i<m_nCount; i++) {
1146 ! sprintf(buf, "%.8f %.8f\r\n", m_startPoint + (icFloatNumber)i*range/last, m_pSamples[i]);
1147 sDescription += buf;
1150 ! sDescription += "\r\n";
1155 icFloatNumber last = (icFloatNumber)(m_nCount-1);
1157 for (i=0; i<m_nCount; i++) {
1158 ! sprintf(buf, "%.8f %.8f\n", m_startPoint + (icFloatNumber)i*range/last, m_pSamples[i]);
1159 sDescription += buf;
1162 ! sDescription += "\n";
1169 sReport += icValidateWarningMsg;
1170 sReport += sSigName;
1171 ! sReport += " sampled curve has non zero reserved data.\r\n";
1172 rv = icValidateWarning;
1177 sReport += icValidateWarningMsg;
1178 sReport += sSigName;
1179 ! sReport += " sampled curve has non zero reserved data.\n";
1180 rv = icValidateWarning;
1186 sReport += icValidateCriticalErrorMsg;
1187 sReport += sSigName;
1188 ! sReport += " sampled curve has too few sample points.\r\n";
1189 rv = icValidateCriticalError;
1191 else if (m_endPoint-m_startPoint == 0.0) {
1192 sReport += icValidateWarningMsg;
1193 sReport += sSigName;
1194 ! sReport += " sampled curve has a range of zero.\r\n";
1195 rv = icMaxStatus(rv, icValidateWarning);
1200 sReport += icValidateCriticalErrorMsg;
1201 sReport += sSigName;
1202 ! sReport += " sampled curve has too few sample points.\n";
1203 rv = icValidateCriticalError;
1205 else if (m_endPoint-m_startPoint == 0.0) {
1206 sReport += icValidateWarningMsg;
1207 sReport += sSigName;
1208 ! sReport += " sampled curve has a range of zero.\n";
1209 rv = icMaxStatus(rv, icValidateWarning);
1215 CIccCurveSegmentList::iterator i;
1217 ! sDescription += "BEGIN_CURVE\r\n";
1218 for (i=m_list->begin(); i!=m_list->end(); i++) {
1219 (*i)->Describe(sDescription);
1223 CIccCurveSegmentList::iterator i;
1225 ! sDescription += "BEGIN_CURVE\n";
1226 for (i=m_list->begin(); i!=m_list->end(); i++) {
1227 (*i)->Describe(sDescription);
1231 if (m_nReserved1 || m_nReserved2) {
1232 sReport += icValidateWarningMsg;
1233 sReport += sSigName;
1234 ! sReport += " Segmented curve has non zero reserved data.\r\n";
1235 rv = icValidateWarning;
1239 if (m_nReserved1 || m_nReserved2) {
1240 sReport += icValidateWarningMsg;
1241 sReport += sSigName;
1242 ! sReport += " Segmented curve has non zero reserved data.\n";
1243 rv = icValidateWarning;
1248 if (m_list->size()==0) {
1249 sReport += icValidateCriticalErrorMsg;
1250 sReport += sSigName;
1251 ! sReport += " Has Empty CurveSegment!\r\n";
1252 return icValidateCriticalError;
1256 if (m_list->size()==0) {
1257 sReport += icValidateCriticalErrorMsg;
1258 sReport += sSigName;
1259 ! sReport += " Has Empty CurveSegment!\n";
1260 return icValidateCriticalError;
1268 ! sprintf(buf, "BEGIN_CURVE_SET %d\r\n", m_nInputChannels);
1269 sDescription += buf;
1271 for (i=0; i<m_nInputChannels; i++) {
1272 ! sprintf(buf, "Curve %d of %d\r\n", i+1, m_nInputChannels);
1273 sDescription += buf;
1275 m_curve[i]->Describe(sDescription);
1280 ! sprintf(buf, "BEGIN_CURVE_SET %d\n", m_nInputChannels);
1281 sDescription += buf;
1283 for (i=0; i<m_nInputChannels; i++) {
1284 ! sprintf(buf, "Curve %d of %d\n", i+1, m_nInputChannels);
1285 sDescription += buf;
1287 m_curve[i]->Describe(sDescription);
1290 sReport += " - Element ";
1291 sSigName = Info.GetSigName(GetType());
1292 sReport += sSigName;
1293 ! sReport += " Has Empty Curve Element(s)!\r\n";
1294 return icValidateCriticalError;
1298 sReport += " - Element ";
1299 sSigName = Info.GetSigName(GetType());
1300 sReport += sSigName;
1301 ! sReport += " Has Empty Curve Element(s)!\n";
1302 return icValidateCriticalError;
1308 icFloatNumber *data = m_pMatrix;
1310 ! sprintf(buf, "BEGIN_ELEM_MATRIX %d %d\r\n", m_nInputChannels, m_nOutputChannels);
1311 sDescription += buf;
1313 for (j=0; j<m_nOutputChannels; j++) {
1316 icFloatNumber *data = m_pMatrix;
1318 ! sprintf(buf, "BEGIN_ELEM_MATRIX %d %d\n", m_nInputChannels, m_nOutputChannels);
1319 sDescription += buf;
1321 for (j=0; j<m_nOutputChannels; j++) {
1324 sprintf(buf, "%12.8lf", data[i]);
1325 sDescription += buf;
1327 ! sprintf(buf, " + %12.8lf\r\n", m_pConstants[j]);
1328 sDescription += buf;
1332 sprintf(buf, "%12.8lf", data[i]);
1333 sDescription += buf;
1335 ! sprintf(buf, " + %12.8lf\n", m_pConstants[j]);
1336 sDescription += buf;
1341 sReport += " - Element ";
1342 sSigName = Info.GetSigName(GetType());
1343 sReport += sSigName;
1344 ! sReport += " Has Empty Matrix data!\r\n";
1345 return icValidateCriticalError;
1349 sReport += " - Element ";
1350 sSigName = Info.GetSigName(GetType());
1351 sReport += sSigName;
1352 ! sReport += " Has Empty Matrix data!\n";
1353 return icValidateCriticalError;
1358 sReport += " - Element ";
1359 sSigName = Info.GetSigName(GetType());
1360 sReport += sSigName;
1361 ! sReport += " Has No CLUT!\r\n";
1362 return icValidateCriticalError;
1366 sReport += " - Element ";
1367 sSigName = Info.GetSigName(GetType());
1368 sReport += sSigName;
1369 ! sReport += " Has No CLUT!\n";
1370 return icValidateCriticalError;
1373 *** misc/SampleICC-1.3.2/IccProfLib/IccProfLibConf.h Mon Aug 20 22:05:00 2007
1374 --- misc/build/SampleICC-1.3.2/IccProfLib/IccProfLibConf.h Fri Jan 25 14:23:09 2008
1380 ! #if defined(_MSC_VER) && !defined(__MWERKS__) && defined(_M_IX86)
1382 //Define how 64 bit integers are represented
1383 #define ICCUINT64 unsigned __int64
1388 ! #if defined(_MSC_VER) && !defined(__MWERKS__)
1390 //Define how 64 bit integers are represented
1391 #define ICCUINT64 unsigned __int64
1395 #else // non-PC, perhaps Mac or Linux
1397 ! #define ICCUINT64 unsigned long long
1398 ! #define ICCINT64 long long
1399 ! #define ICUINT64TYPE unsigned long long
1400 ! #define ICINT64TYPE long long
1402 ! #if defined(__APPLE__)
1403 ! #if defined(__LITTLE_ENDIAN__)
1404 ! #define ICC_BYTE_ORDER_LITTLE_ENDIAN
1406 ! #define ICC_BYTE_ORDER_BIG_ENDIAN
1409 ! #define ICC_BYTE_ORDER_LITTLE_ENDIAN
1412 #define ICCPROFLIB_API
1413 #define ICCPROFLIB_EXTERN
1416 #else // non-PC, perhaps Mac or Linux
1418 ! #include <sal/types.h>
1419 ! #include <osl/endian.h>
1421 ! #define ICCUINT64 sal_uInt64
1422 ! #define ICCINT64 sal_Int64
1423 ! #define ICUINT64TYPE sal_uInt64
1424 ! #define ICINT64TYPE sal_Int64
1425 ! #define ICINT32TYPE sal_Int32
1426 ! #define ICUINT32TYPE sal_uInt32
1428 ! #if defined(_LITTLE_ENDIAN)
1429 ! # define ICC_BYTE_ORDER_LITTLE_ENDIAN
1430 ! #elif defined(_BIG_ENDIAN)
1431 ! # define ICC_BYTE_ORDER_BIG_ENDIAN
1433 ! # error "ENDIAN unknown"
1436 #define ICCPROFLIB_API
1437 #define ICCPROFLIB_EXTERN
1438 *** misc/SampleICC-1.3.2/IccProfLib/IccProfile.cpp Mon Aug 20 22:05:00 2007
1439 --- misc/build/SampleICC-1.3.2/IccProfLib/IccProfile.cpp Fri Jan 25 14:23:09 2008
1443 if (!ReadBasic(pIO)) {
1444 sReport += icValidateCriticalErrorMsg;
1445 ! sReport += " - Unable to read profile!**\r\n\tProfile has invalid structure!\r\n";
1448 return icValidateCriticalError;
1451 if (!ReadBasic(pIO)) {
1452 sReport += icValidateCriticalErrorMsg;
1453 ! sReport += " - Unable to read profile!**\n\tProfile has invalid structure!\n";
1456 return icValidateCriticalError;
1459 // Check profile header
1460 if (!CheckFileSize(pIO)) {
1461 sReport += icValidateNonCompliantMsg;
1462 ! sReport += "Bad Header File Size\r\n";
1463 rv = icMaxStatus(rv, icValidateNonCompliant);
1467 // Check profile header
1468 if (!CheckFileSize(pIO)) {
1469 sReport += icValidateNonCompliantMsg;
1470 ! sReport += "Bad Header File Size\n";
1471 rv = icMaxStatus(rv, icValidateNonCompliant);
1476 CalcProfileID(pIO, &profileID);
1477 if (strncmp((char*)profileID.ID8, (char*)m_Header.profileID.ID8, 16) != 0) {
1478 sReport += icValidateNonCompliantMsg;
1479 ! sReport += "Bad Profile ID\r\n";
1481 rv = icMaxStatus(rv, icValidateNonCompliant);
1484 CalcProfileID(pIO, &profileID);
1485 if (strncmp((char*)profileID.ID8, (char*)m_Header.profileID.ID8, 16) != 0) {
1486 sReport += icValidateNonCompliantMsg;
1487 ! sReport += "Bad Profile ID\n";
1489 rv = icMaxStatus(rv, icValidateNonCompliant);
1493 sReport += icValidateCriticalErrorMsg;
1495 sReport += Info.GetTagSigName(i->TagInfo.sig);
1496 ! sReport += " - Tag has invalid structure!\r\n";
1498 rv = icMaxStatus(rv, icValidateCriticalError);
1501 sReport += icValidateCriticalErrorMsg;
1503 sReport += Info.GetTagSigName(i->TagInfo.sig);
1504 ! sReport += " - Tag has invalid structure!\n";
1506 rv = icMaxStatus(rv, icValidateCriticalError);
1512 sReport += icValidateCriticalErrorMsg;
1513 ! sprintf(buf, " - %s: Unknown profile class!\r\n", Info.GetProfileClassSigName(m_Header.deviceClass));
1515 rv = icMaxStatus(rv, icValidateCriticalError);
1520 sReport += icValidateCriticalErrorMsg;
1521 ! sprintf(buf, " - %s: Unknown profile class!\n", Info.GetProfileClassSigName(m_Header.deviceClass));
1523 rv = icMaxStatus(rv, icValidateCriticalError);
1528 if (!Info.IsValidSpace(m_Header.colorSpace)) {
1529 sReport += icValidateCriticalErrorMsg;
1530 ! sprintf(buf, " - %s: Unknown color space!\r\n", Info.GetColorSpaceSigName(m_Header.colorSpace));
1532 rv = icMaxStatus(rv, icValidateCriticalError);
1536 if (!Info.IsValidSpace(m_Header.colorSpace)) {
1537 sReport += icValidateCriticalErrorMsg;
1538 ! sprintf(buf, " - %s: Unknown color space!\n", Info.GetColorSpaceSigName(m_Header.colorSpace));
1540 rv = icMaxStatus(rv, icValidateCriticalError);
1544 if (m_Header.deviceClass==icSigLinkClass) {
1545 if (!Info.IsValidSpace(m_Header.pcs)) {
1546 sReport += icValidateCriticalErrorMsg;
1547 ! sprintf(buf, " - %s: Unknown pcs color space!\r\n", Info.GetColorSpaceSigName(m_Header.pcs));
1549 rv = icMaxStatus(rv, icValidateCriticalError);
1552 if (m_Header.deviceClass==icSigLinkClass) {
1553 if (!Info.IsValidSpace(m_Header.pcs)) {
1554 sReport += icValidateCriticalErrorMsg;
1555 ! sprintf(buf, " - %s: Unknown pcs color space!\n", Info.GetColorSpaceSigName(m_Header.pcs));
1557 rv = icMaxStatus(rv, icValidateCriticalError);
1562 if (m_Header.pcs!=icSigXYZData && m_Header.pcs!=icSigLabData) {
1563 sReport += icValidateCriticalErrorMsg;
1564 ! sprintf(buf, " - %s: Invalid pcs color space!\r\n", Info.GetColorSpaceSigName(m_Header.pcs));
1566 rv = icMaxStatus(rv, icValidateCriticalError);
1570 if (m_Header.pcs!=icSigXYZData && m_Header.pcs!=icSigLabData) {
1571 sReport += icValidateCriticalErrorMsg;
1572 ! sprintf(buf, " - %s: Invalid pcs color space!\n", Info.GetColorSpaceSigName(m_Header.pcs));
1574 rv = icMaxStatus(rv, icValidateCriticalError);
1580 sReport += icValidateWarningMsg;
1581 ! sprintf(buf, " - %s: Unknown platform signature.\r\n", Info.GetPlatformSigName(m_Header.platform));
1583 rv = icMaxStatus(rv, icValidateWarning);
1588 sReport += icValidateWarningMsg;
1589 ! sprintf(buf, " - %s: Unknown platform signature.\n", Info.GetPlatformSigName(m_Header.platform));
1591 rv = icMaxStatus(rv, icValidateWarning);
1597 sReport += icValidateWarningMsg;
1598 ! sprintf(buf, " - %s: Unregisterd CMM signature.\r\n", Info.GetCmmSigName((icCmmSignature)m_Header.cmmId));
1600 rv = icMaxStatus(rv, icValidateWarning);
1605 sReport += icValidateWarningMsg;
1606 ! sprintf(buf, " - %s: Unregistered CMM signature.\n", Info.GetCmmSigName((icCmmSignature)m_Header.cmmId));
1608 rv = icMaxStatus(rv, icValidateWarning);
1614 sReport += icValidateCriticalErrorMsg;
1615 ! sprintf(buf, " - %s: Unknown rendering intent!\r\n", Info.GetRenderingIntentName((icRenderingIntent)m_Header.renderingIntent));
1617 rv = icMaxStatus(rv, icValidateCriticalError);
1622 sReport += icValidateCriticalErrorMsg;
1623 ! sprintf(buf, " - %s: Unknown rendering intent!\n", Info.GetRenderingIntentName((icRenderingIntent)m_Header.renderingIntent));
1625 rv = icMaxStatus(rv, icValidateCriticalError);
1629 icFloatNumber Z = icFtoD(m_Header.illuminant.Z);
1630 if (X<0.9640 || X>0.9644 || Y!=1.0 || Z<0.8247 || Z>0.8251) {
1631 sReport += icValidateNonCompliantMsg;
1632 ! sReport += " - Non D50 Illuminant XYZ values.\r\n";
1633 rv = icMaxStatus(rv, icValidateNonCompliant);
1637 icFloatNumber Z = icFtoD(m_Header.illuminant.Z);
1638 if (X<0.9640 || X>0.9644 || Y!=1.0 || Z<0.8247 || Z>0.8251) {
1639 sReport += icValidateNonCompliantMsg;
1640 ! sReport += " - Non D50 Illuminant XYZ values.\n";
1641 rv = icMaxStatus(rv, icValidateNonCompliant);
1648 sReport += icValidateNonCompliantMsg;
1649 ! sReport += " - Reserved value must be zero.\r\n";
1650 rv = icMaxStatus(rv, icValidateNonCompliant);
1656 sReport += icValidateNonCompliantMsg;
1657 ! sReport += " - Reserved value must be zero.\n";
1658 rv = icMaxStatus(rv, icValidateNonCompliant);
1664 sReport += icValidateWarningMsg;
1666 ! sReport += " - Tag exclusion test failed.\r\n";
1672 sReport += icValidateWarningMsg;
1674 ! sReport += " - Tag exclusion test failed.\n";
1681 sReport += icValidateWarningMsg;
1683 ! sReport += " - Tag exclusion test failed.\r\n";
1689 sReport += icValidateWarningMsg;
1691 ! sReport += " - Tag exclusion test failed.\n";
1698 sReport += icValidateWarningMsg;
1700 ! sReport += " - Tag exclusion test failed.\r\n";
1706 sReport += icValidateWarningMsg;
1708 ! sReport += " - Tag exclusion test failed.\n";
1714 if (!IsTypeValid(tagsig, typesig)) {
1715 sReport += icValidateNonCompliantMsg;
1717 ! sprintf(buf," - %s: Invalid tag type (Might be critical!).\r\n", Info.GetTagTypeSigName(typesig));
1719 rv = icMaxStatus(rv, icValidateNonCompliant);
1722 if (!IsTypeValid(tagsig, typesig)) {
1723 sReport += icValidateNonCompliantMsg;
1725 ! sprintf(buf," - %s: Invalid tag type (Might be critical!).\n", Info.GetTagTypeSigName(typesig));
1727 rv = icMaxStatus(rv, icValidateNonCompliant);
1732 if (m_Tags->size() <= 0) {
1733 sReport += icValidateCriticalErrorMsg;
1734 ! sReport += "No tags present.\r\n";
1735 return icValidateCriticalError;
1740 if (m_Tags->size() <= 0) {
1741 sReport += icValidateCriticalErrorMsg;
1742 ! sReport += "No tags present.\n";
1743 return icValidateCriticalError;
1748 if (!GetTag(icSigProfileDescriptionTag) ||
1749 !GetTag(icSigCopyrightTag)) {
1750 sReport += icValidateNonCompliantMsg;
1751 ! sReport += "Required tags missing.\r\n";
1752 rv = icMaxStatus(rv, icValidateNonCompliant);
1756 if (!GetTag(icSigProfileDescriptionTag) ||
1757 !GetTag(icSigCopyrightTag)) {
1758 sReport += icValidateNonCompliantMsg;
1759 ! sReport += "Required tags missing.\n";
1760 rv = icMaxStatus(rv, icValidateNonCompliant);
1765 if (sig != icSigLinkClass) {
1766 if (!GetTag(icSigMediaWhitePointTag)) {
1767 sReport += icValidateCriticalErrorMsg;
1768 ! sReport += "Media white point tag missing.\r\n";
1769 rv = icMaxStatus(rv, icValidateCriticalError);
1773 if (sig != icSigLinkClass) {
1774 if (!GetTag(icSigMediaWhitePointTag)) {
1775 sReport += icValidateCriticalErrorMsg;
1776 ! sReport += "Media white point tag missing.\n";
1777 rv = icMaxStatus(rv, icValidateCriticalError);
1782 if (m_Header.colorSpace == icSigGrayData) {
1783 if (!GetTag(icSigGrayTRCTag)) {
1784 sReport += icValidateCriticalErrorMsg;
1785 ! sReport += "Gray TRC tag missing.\r\n";
1786 rv = icMaxStatus(rv, icValidateCriticalError);
1790 if (m_Header.colorSpace == icSigGrayData) {
1791 if (!GetTag(icSigGrayTRCTag)) {
1792 sReport += icValidateCriticalErrorMsg;
1793 ! sReport += "Gray TRC tag missing.\n";
1794 rv = icMaxStatus(rv, icValidateCriticalError);
1799 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1800 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1801 sReport += icValidateCriticalErrorMsg;
1802 ! sReport += "Critical tag(s) missing.\r\n";
1803 rv = icMaxStatus(rv, icValidateCriticalError);
1807 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1808 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1809 sReport += icValidateCriticalErrorMsg;
1810 ! sReport += "Critical tag(s) missing.\n";
1811 rv = icMaxStatus(rv, icValidateCriticalError);
1816 if (m_Header.colorSpace == icSigGrayData) {
1817 if (!GetTag(icSigGrayTRCTag)) {
1818 sReport += icValidateCriticalErrorMsg;
1819 ! sReport += "Gray TRC tag missing.\r\n";
1820 rv = icMaxStatus(rv, icValidateCriticalError);
1824 if (m_Header.colorSpace == icSigGrayData) {
1825 if (!GetTag(icSigGrayTRCTag)) {
1826 sReport += icValidateCriticalErrorMsg;
1827 ! sReport += "Gray TRC tag missing.\n";
1828 rv = icMaxStatus(rv, icValidateCriticalError);
1833 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1834 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1835 sReport += icValidateCriticalErrorMsg;
1836 ! sReport += "Critical tag(s) missing.\r\n";
1837 rv = icMaxStatus(rv, icValidateCriticalError);
1841 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1842 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1843 sReport += icValidateCriticalErrorMsg;
1844 ! sReport += "Critical tag(s) missing.\n";
1845 rv = icMaxStatus(rv, icValidateCriticalError);
1850 if (m_Header.colorSpace == icSigGrayData) {
1851 if (!GetTag(icSigGrayTRCTag)) {
1852 sReport += icValidateCriticalErrorMsg;
1853 ! sReport += "Gray TRC tag missing.\r\n";
1854 rv = icMaxStatus(rv, icValidateCriticalError);
1858 if (m_Header.colorSpace == icSigGrayData) {
1859 if (!GetTag(icSigGrayTRCTag)) {
1860 sReport += icValidateCriticalErrorMsg;
1861 ! sReport += "Gray TRC tag missing.\n";
1862 rv = icMaxStatus(rv, icValidateCriticalError);
1867 !GetTag(icSigAToB1Tag) || !GetTag(icSigBToA1Tag) ||
1868 !GetTag(icSigAToB2Tag) || !GetTag(icSigBToA2Tag)) {
1869 sReport += icValidateCriticalErrorMsg;
1870 ! sReport += "Critical tag(s) missing.\r\n";
1871 rv = icMaxStatus(rv, icValidateCriticalError);
1874 if (!GetTag(icSigGamutTag)) {
1875 sReport += icValidateNonCompliantMsg;
1876 ! sReport += "Gamut tag missing.\r\n";
1877 rv = icMaxStatus(rv, icValidateNonCompliant);
1881 !GetTag(icSigAToB1Tag) || !GetTag(icSigBToA1Tag) ||
1882 !GetTag(icSigAToB2Tag) || !GetTag(icSigBToA2Tag)) {
1883 sReport += icValidateCriticalErrorMsg;
1884 ! sReport += "Critical tag(s) missing.\n";
1885 rv = icMaxStatus(rv, icValidateCriticalError);
1888 if (!GetTag(icSigGamutTag)) {
1889 sReport += icValidateNonCompliantMsg;
1890 ! sReport += "Gamut tag missing.\n";
1891 rv = icMaxStatus(rv, icValidateNonCompliant);
1896 case icSig16colorData:
1897 if (!GetTag(icSigColorantTableTag)) {
1898 sReport += icValidateNonCompliantMsg;
1899 ! sReport += "xCLR output profile is missing colorantTableTag\r\n";
1900 rv = icMaxStatus(rv, icValidateNonCompliant);
1904 case icSig16colorData:
1905 if (!GetTag(icSigColorantTableTag)) {
1906 sReport += icValidateNonCompliantMsg;
1907 ! sReport += "xCLR output profile is missing colorantTableTag\n";
1908 rv = icMaxStatus(rv, icValidateNonCompliant);
1913 case icSigLinkClass:
1914 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigProfileSequenceDescTag)) {
1915 sReport += icValidateCriticalErrorMsg;
1916 ! sReport += "Critical tag(s) missing.\r\n";
1917 rv = icMaxStatus(rv, icValidateCriticalError);
1921 case icSigLinkClass:
1922 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigProfileSequenceDescTag)) {
1923 sReport += icValidateCriticalErrorMsg;
1924 ! sReport += "Critical tag(s) missing.\n";
1925 rv = icMaxStatus(rv, icValidateCriticalError);
1930 if (icIsSpaceCLR(m_Header.colorSpace)) {
1931 if (!GetTag(icSigColorantTableTag)) {
1932 sReport += icValidateNonCompliantMsg;
1933 ! sReport += "Required tag(s) missing.\r\n";
1934 rv = icMaxStatus(rv, icValidateNonCompliant);
1938 if (icIsSpaceCLR(m_Header.colorSpace)) {
1939 if (!GetTag(icSigColorantTableTag)) {
1940 sReport += icValidateNonCompliantMsg;
1941 ! sReport += "Required tag(s) missing.\n";
1942 rv = icMaxStatus(rv, icValidateNonCompliant);
1947 if (icIsSpaceCLR(m_Header.pcs)) {
1948 if (!GetTag(icSigColorantTableOutTag)) {
1949 sReport += icValidateNonCompliantMsg;
1950 ! sReport += "Required tag(s) missing.\r\n";
1951 rv = icMaxStatus(rv, icValidateNonCompliant);
1955 if (icIsSpaceCLR(m_Header.pcs)) {
1956 if (!GetTag(icSigColorantTableOutTag)) {
1957 sReport += icValidateNonCompliantMsg;
1958 ! sReport += "Required tag(s) missing.\n";
1959 rv = icMaxStatus(rv, icValidateNonCompliant);
1964 case icSigColorSpaceClass:
1965 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigBToA0Tag)) {
1966 sReport += icValidateCriticalErrorMsg;
1967 ! sReport += "Critical tag(s) missing.\r\n";
1968 rv = icMaxStatus(rv, icValidateCriticalError);
1972 case icSigColorSpaceClass:
1973 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigBToA0Tag)) {
1974 sReport += icValidateCriticalErrorMsg;
1975 ! sReport += "Critical tag(s) missing.\n";
1976 rv = icMaxStatus(rv, icValidateCriticalError);
1981 case icSigAbstractClass:
1982 if (!GetTag(icSigAToB0Tag)) {
1983 sReport += icValidateCriticalErrorMsg;
1984 ! sReport += "Critical tag(s) missing.\r\n";
1985 rv = icMaxStatus(rv, icValidateCriticalError);
1989 case icSigAbstractClass:
1990 if (!GetTag(icSigAToB0Tag)) {
1991 sReport += icValidateCriticalErrorMsg;
1992 ! sReport += "Critical tag(s) missing.\n";
1993 rv = icMaxStatus(rv, icValidateCriticalError);
1998 case icSigNamedColorClass:
1999 if (!GetTag(icSigNamedColor2Tag)) {
2000 sReport += icValidateCriticalErrorMsg;
2001 ! sReport += "Critical tag(s) missing.\r\n";
2002 rv = icMaxStatus(rv, icValidateCriticalError);
2006 case icSigNamedColorClass:
2007 if (!GetTag(icSigNamedColor2Tag)) {
2008 sReport += icValidateCriticalErrorMsg;
2009 ! sReport += "Critical tag(s) missing.\n";
2010 rv = icMaxStatus(rv, icValidateCriticalError);
2017 sReport += icValidateCriticalErrorMsg;
2018 ! sReport += "Unknown Profile Class.\r\n";
2019 rv = icMaxStatus(rv, icValidateCriticalError);
2025 sReport += icValidateCriticalErrorMsg;
2026 ! sReport += "Unknown Profile Class.\n";
2027 rv = icMaxStatus(rv, icValidateCriticalError);
2032 // Check for duplicate tags
2033 if (!AreTagsUnique()) {
2034 sReport += icValidateWarning;
2035 ! sReport += " - There are duplicate tags.\r\n";
2036 rv =icMaxStatus(rv, icValidateWarning);
2040 // Check for duplicate tags
2041 if (!AreTagsUnique()) {
2042 sReport += icValidateWarning;
2043 ! sReport += " - There are duplicate tags.\n";
2044 rv =icMaxStatus(rv, icValidateWarning);
2049 sReport = icValidateCriticalErrorMsg;
2051 sReport += szFilename;
2052 ! sReport += "- Invalid Filename\r\n";
2057 sReport = icValidateCriticalErrorMsg;
2059 sReport += szFilename;
2060 ! sReport += "- Invalid Filename\n";
2064 *** misc/SampleICC-1.3.2/IccProfLib/IccTagBasic.cpp Mon Aug 20 22:05:00 2007
2065 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagBasic.cpp Fri Jan 25 14:23:09 2008
2069 sReport += icValidateNonCompliantMsg;
2070 sReport += Info.GetSigName(sig);
2071 ! sReport += " - Reserved Value must be zero.\r\n";
2073 rv = icValidateNonCompliant;
2077 sReport += icValidateNonCompliantMsg;
2078 sReport += Info.GetSigName(sig);
2079 ! sReport += " - Reserved Value must be zero.\n";
2081 rv = icValidateNonCompliant;
2085 sprintf(buf, "%u Bytes.", m_nSize-4);
2086 sDescription += buf;
2088 ! sDescription += "\r\n\r\nData Follows:\r\n";
2090 icMemDump(sDescription, m_pData+4, m_nSize-4);
2093 sprintf(buf, "%u Bytes.", m_nSize-4);
2094 sDescription += buf;
2096 ! sDescription += "\n\nData Follows:\n";
2098 icMemDump(sDescription, m_pData+4, m_nSize-4);
2102 if (m_szText && *m_szText)
2103 sDescription += m_szText;
2105 ! sDescription += "\"\r\n";
2110 if (m_szText && *m_szText)
2111 sDescription += m_szText;
2113 ! sDescription += "\"\n";
2120 sReport += icValidateNonCompliantMsg;
2121 sReport += sSigName;
2122 ! sReport += " - Tag must have at least seven text characters.\r\n";
2123 rv = icMaxStatus(rv, icValidateNonCompliant);
2128 sReport += icValidateNonCompliantMsg;
2129 sReport += sSigName;
2130 ! sReport += " - Tag must have at least seven text characters.\n";
2131 rv = icMaxStatus(rv, icValidateNonCompliant);
2137 sReport += icValidateWarningMsg;
2138 sReport += sSigName;
2139 ! sReport += " - Unknown Tag.\r\n";
2140 rv = icMaxStatus(rv, icValidateWarning);
2145 sReport += icValidateWarningMsg;
2146 sReport += sSigName;
2147 ! sReport += " - Unknown Tag.\n";
2148 rv = icMaxStatus(rv, icValidateWarning);
2153 if (m_szText[i]&0x80) {
2154 sReport += icValidateWarning;
2155 sReport += sSigName;
2156 ! sReport += " - Text do not contain 7bit data.\r\n";
2161 if (m_szText[i]&0x80) {
2162 sReport += icValidateWarning;
2163 sReport += sSigName;
2164 ! sReport += " - Text do not contain 7bit data.\n";
2171 sReport += icValidateWarningMsg;
2172 sReport += sSigName;
2173 ! sReport += " - Empty Tag.\r\n";
2174 rv = icMaxStatus(rv, icValidateWarning);
2179 sReport += icValidateWarningMsg;
2180 sReport += sSigName;
2181 ! sReport += " - Empty Tag.\n";
2182 rv = icMaxStatus(rv, icValidateWarning);
2187 if (m_szText && *m_szText)
2188 sDescription += m_szText;
2190 ! sDescription += "\"\r\n";
2195 if (m_szText && *m_szText)
2196 sDescription += m_szText;
2198 ! sDescription += "\"\n";
2204 if (m_nScriptSize>67) {
2205 sReport += icValidateNonCompliantMsg;
2206 sReport += sSigName;
2207 ! sReport += " - ScriptCode count must not be greater than 67.\r\n";
2209 rv =icMaxStatus(rv, icValidateNonCompliant);
2212 if (m_nScriptSize>67) {
2213 sReport += icValidateNonCompliantMsg;
2214 sReport += sSigName;
2215 ! sReport += " - ScriptCode count must not be greater than 67.\n";
2217 rv =icMaxStatus(rv, icValidateNonCompliant);
2223 sDescription += Fmt.GetSigName(m_nSig);
2224 ! sDescription += "\r\n";
2231 sDescription += Fmt.GetSigName(m_nSig);
2232 ! sDescription += "\n";
2239 sReport += icValidateNonCompliantMsg;
2240 sReport += sSigName;
2241 ! sprintf(buf, " - %s: Unknown Technology.\r\n", Info.GetSigName(m_nSig));
2243 rv = icMaxStatus(rv, icValidateNonCompliant);
2247 sReport += icValidateNonCompliantMsg;
2248 sReport += sSigName;
2249 ! sprintf(buf, " - %s: Unknown Technology.\n", Info.GetSigName(m_nSig));
2251 rv = icMaxStatus(rv, icValidateNonCompliant);
2256 sReport += icValidateNonCompliantMsg;
2257 sReport += sSigName;
2258 ! sprintf(buf, " - %s: Unknown Reference Medium Gamut.\r\n", Info.GetSigName(m_nSig));
2260 rv = icMaxStatus(rv, icValidateNonCompliant);
2264 sReport += icValidateNonCompliantMsg;
2265 sReport += sSigName;
2266 ! sprintf(buf, " - %s: Unknown Reference Medium Gamut.\n", Info.GetSigName(m_nSig));
2268 rv = icMaxStatus(rv, icValidateNonCompliant);
2273 sReport += icValidateNonCompliantMsg;
2274 sReport += sSigName;
2275 ! sprintf(buf, " - %s: Unknown Colorimetric Intent Image State.\r\n", Info.GetSigName(m_nSig));
2277 rv = icMaxStatus(rv, icValidateNonCompliant);
2281 sReport += icValidateNonCompliantMsg;
2282 sReport += sSigName;
2283 ! sprintf(buf, " - %s: Unknown Colorimetric Intent Image State.\n", Info.GetSigName(m_nSig));
2285 rv = icMaxStatus(rv, icValidateNonCompliant);
2290 sDescription.reserve(sDescription.size() + m_nSize*79);
2292 ! sprintf(buf, "BEGIN_NAMED_COLORS flags=%08x %u %u\r\n", m_nVendorFlags, m_nSize, m_nDeviceCoords);
2293 sDescription += buf;
2295 for (i=0; i<m_nSize; i++) {
2298 sDescription.reserve(sDescription.size() + m_nSize*79);
2300 ! sprintf(buf, "BEGIN_NAMED_COLORS flags=%08x %u %u\n", m_nVendorFlags, m_nSize, m_nDeviceCoords);
2301 sDescription += buf;
2303 for (i=0; i<m_nSize; i++) {
2306 sDescription += buf;
2309 ! sDescription += "\r\n";
2311 pNamedColor = (SIccNamedColorEntry*)((icChar*)pNamedColor + m_nColorEntrySize);
2314 sDescription += buf;
2317 ! sDescription += "\n";
2319 pNamedColor = (SIccNamedColorEntry*)((icChar*)pNamedColor + m_nColorEntrySize);
2324 sReport += icValidateWarningMsg;
2325 sReport += sSigName;
2326 ! sReport += " - Empty tag!\r\n";
2327 rv = icMaxStatus(rv, icValidateWarning);
2332 sReport += icValidateWarningMsg;
2333 sReport += sSigName;
2334 ! sReport += " - Empty tag!\n";
2335 rv = icMaxStatus(rv, icValidateWarning);
2340 if (m_nDeviceCoords != nCoords) {
2341 sReport += icValidateNonCompliantMsg;
2342 sReport += sSigName;
2343 ! sReport += " - Incorrect number of device co-ordinates.\r\n";
2344 rv = icMaxStatus(rv, icValidateNonCompliant);
2348 if (m_nDeviceCoords != nCoords) {
2349 sReport += icValidateNonCompliantMsg;
2350 sReport += sSigName;
2351 ! sReport += " - Incorrect number of device co-ordinates.\n";
2352 rv = icMaxStatus(rv, icValidateNonCompliant);
2358 sReport += icValidateWarningMsg;
2359 sReport += sSigName;
2360 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
2361 rv = icMaxStatus(rv, icValidateWarning);
2366 sReport += icValidateWarningMsg;
2367 sReport += sSigName;
2368 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
2369 rv = icMaxStatus(rv, icValidateWarning);
2376 if (m_nSize == 1 ) {
2377 ! 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));
2378 sDescription += buf;
2384 if (m_nSize == 1 ) {
2385 ! sprintf(buf, "X=%.4lf, Y=%.4lf, Z=%.4lf\n", icFtoD(m_XYZ[0].X), icFtoD(m_XYZ[0].Y), icFtoD(m_XYZ[0].Z));
2386 sDescription += buf;
2391 sDescription.reserve(sDescription.size() + m_nSize*79);
2393 for (i=0; i<m_nSize; i++) {
2394 ! 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));
2395 sDescription += buf;
2399 sDescription.reserve(sDescription.size() + m_nSize*79);
2401 for (i=0; i<m_nSize; i++) {
2402 ! 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));
2403 sDescription += buf;
2409 sReport += icValidateWarningMsg;
2410 sReport += sSigName;
2411 ! sReport += " - Empty tag.\r\n";
2413 rv = icMaxStatus(rv, icValidateWarning);
2417 sReport += icValidateWarningMsg;
2418 sReport += sSigName;
2419 ! sReport += " - Empty tag.\n";
2421 rv = icMaxStatus(rv, icValidateWarning);
2427 //sDescription.reserve(sDescription.size() + m_nChannels*79);
2428 ! sprintf(buf, "Number of Channels : %u\r\n", m_nChannels);
2429 sDescription += buf;
2431 ! sprintf(buf, "Colorant Encoding : %s\r\n", Fmt.GetColorantEncoding((icColorantEncoding)m_nColorantType));
2432 sDescription += buf;
2434 for (i=0; i<m_nChannels; i++) {
2435 ! sprintf(buf, "value[%u]: x=%.3lf, y=%.3lf\r\n", i, icUFtoD(m_xy[i].x), icUFtoD(m_xy[i].y));
2436 sDescription += buf;
2442 //sDescription.reserve(sDescription.size() + m_nChannels*79);
2443 ! sprintf(buf, "Number of Channels : %u\n", m_nChannels);
2444 sDescription += buf;
2446 ! sprintf(buf, "Colorant Encoding : %s\n", Fmt.GetColorantEncoding((icColorantEncoding)m_nColorantType));
2447 sDescription += buf;
2449 for (i=0; i<m_nChannels; i++) {
2450 ! sprintf(buf, "value[%u]: x=%.3lf, y=%.3lf\n", i, icUFtoD(m_xy[i].x), icUFtoD(m_xy[i].y));
2451 sDescription += buf;
2456 if (m_nChannels!=3) {
2457 sReport += icValidateCriticalErrorMsg;
2458 sReport += sSigName;
2459 ! sReport += " - Number of device channels must be three.\r\n";
2460 rv = icMaxStatus(rv, icValidateCriticalError);
2464 if (m_nChannels!=3) {
2465 sReport += icValidateCriticalErrorMsg;
2466 sReport += sSigName;
2467 ! sReport += " - Number of device channels must be three.\n";
2468 rv = icMaxStatus(rv, icValidateCriticalError);
2473 (m_xy[2].x != icDtoUF((icFloatNumber)0.150)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.060)) ) {
2474 sReport += icValidateNonCompliantMsg;
2475 sReport += sSigName;
2476 ! sReport += " - Chromaticity data does not match specification.\r\n";
2477 rv = icMaxStatus(rv, icValidateNonCompliant);
2481 (m_xy[2].x != icDtoUF((icFloatNumber)0.150)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.060)) ) {
2482 sReport += icValidateNonCompliantMsg;
2483 sReport += sSigName;
2484 ! sReport += " - Chromaticity data does not match specification.\n";
2485 rv = icMaxStatus(rv, icValidateNonCompliant);
2490 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2491 sReport += icValidateNonCompliantMsg;
2492 sReport += sSigName;
2493 ! sReport += " - Chromaticity data does not match specification.\r\n";
2494 rv = icMaxStatus(rv, icValidateNonCompliant);
2498 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2499 sReport += icValidateNonCompliantMsg;
2500 sReport += sSigName;
2501 ! sReport += " - Chromaticity data does not match specification.\n";
2502 rv = icMaxStatus(rv, icValidateNonCompliant);
2507 (m_xy[2].x != icDtoUF((icFloatNumber)0.15)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.06)) ) {
2508 sReport += icValidateNonCompliantMsg;
2509 sReport += sSigName;
2510 ! sReport += " - Chromaticity data does not match specification.\r\n";
2511 rv = icMaxStatus(rv, icValidateNonCompliant);
2515 (m_xy[2].x != icDtoUF((icFloatNumber)0.15)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.06)) ) {
2516 sReport += icValidateNonCompliantMsg;
2517 sReport += sSigName;
2518 ! sReport += " - Chromaticity data does not match specification.\n";
2519 rv = icMaxStatus(rv, icValidateNonCompliant);
2524 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2525 sReport += icValidateNonCompliantMsg;
2526 sReport += sSigName;
2527 ! sReport += " - Chromaticity data does not match specification.\r\n";
2528 rv = icMaxStatus(rv, icValidateNonCompliant);
2532 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2533 sReport += icValidateNonCompliantMsg;
2534 sReport += sSigName;
2535 ! sReport += " - Chromaticity data does not match specification.\n";
2536 rv = icMaxStatus(rv, icValidateNonCompliant);
2542 sReport += icValidateNonCompliantMsg;
2543 sReport += sSigName;
2544 ! sReport += " - Invalid colorant type encoding.\r\n";
2545 rv = icMaxStatus(rv, icValidateNonCompliant);
2550 sReport += icValidateNonCompliantMsg;
2551 sReport += sSigName;
2552 ! sReport += " - Invalid colorant type encoding.\n";
2553 rv = icMaxStatus(rv, icValidateNonCompliant);
2559 if (m_nSize == 1 ) {
2560 if (Tsig==icSigS15Fixed16ArrayType)
2561 ! sprintf(buf, "Value = %.4lf\r\n", icFtoD(m_Num[0]));
2563 ! sprintf(buf, "Value = %.4lf\r\n", icUFtoD(m_Num[0]));
2564 sDescription += buf;
2569 if (m_nSize == 1 ) {
2570 if (Tsig==icSigS15Fixed16ArrayType)
2571 ! sprintf(buf, "Value = %.4lf\n", icFtoD(m_Num[0]));
2573 ! sprintf(buf, "Value = %.4lf\n", icUFtoD(m_Num[0]));
2574 sDescription += buf;
2581 if (Tsig==icSigS15Fixed16ArrayType && m_nSize==9) {
2582 ! sDescription += "Matrix Form:\r\n";
2583 icMatrixDump(sDescription, (icS15Fixed16Number*)m_Num);
2585 ! sDescription += "\r\nArrayForm:\r\n";
2587 sDescription.reserve(sDescription.size() + m_nSize*79);
2589 for (i=0; i<m_nSize; i++) {
2590 if (Tsig==icSigS15Fixed16ArrayType)
2591 ! sprintf(buf, "Value[%u] = %.4lf\r\n", i, icFtoD(m_Num[i]));
2593 ! sprintf(buf, "Value[%u] = %.4lf\r\n", i, icUFtoD(m_Num[i]));
2594 sDescription += buf;
2600 if (Tsig==icSigS15Fixed16ArrayType && m_nSize==9) {
2601 ! sDescription += "Matrix Form:\n";
2602 icMatrixDump(sDescription, (icS15Fixed16Number*)m_Num);
2604 ! sDescription += "\nArrayForm:\n";
2606 sDescription.reserve(sDescription.size() + m_nSize*79);
2608 for (i=0; i<m_nSize; i++) {
2609 if (Tsig==icSigS15Fixed16ArrayType)
2610 ! sprintf(buf, "Value[%u] = %.4lf\n", i, icFtoD(m_Num[i]));
2612 ! sprintf(buf, "Value[%u] = %.4lf\n", i, icUFtoD(m_Num[i]));
2613 sDescription += buf;
2620 if (m_nSize == 1 ) {
2621 ! sprintf(buf, "Value = %u (0x%x)\r\n", m_Num[0], m_Num[0]);
2622 sDescription += buf;
2628 if (m_nSize == 1 ) {
2629 ! sprintf(buf, "Value = %u (0x%x)\n", m_Num[0], m_Num[0]);
2630 sDescription += buf;
2635 sDescription.reserve(sDescription.size() + m_nSize*79);
2637 for (i=0; i<m_nSize; i++) {
2638 ! sprintf(buf, "Value[%u] = %u (0x%x)\r\n", i, m_Num[i], m_Num[i]);
2639 sDescription += buf;
2643 sDescription.reserve(sDescription.size() + m_nSize*79);
2645 for (i=0; i<m_nSize; i++) {
2646 ! sprintf(buf, "Value[%u] = %u (0x%x)\n", i, m_Num[i], m_Num[i]);
2647 sDescription += buf;
2655 ! sDescription += Fmt.GetStandardObserverName(m_Data.stdObserver); sDescription += "\r\n";
2656 ! sprintf(buf, "Backing measurement: X=%.4lf, Y=%.4lf, Z=%.4lf\r\n",
2657 icFtoD(m_Data.backing.X),
2658 icFtoD(m_Data.backing.Y),
2659 icFtoD(m_Data.backing.Z));
2660 sDescription += buf;
2661 ! sDescription += Fmt.GetMeasurementGeometryName(m_Data.geometry); sDescription += "\r\n";
2662 ! sDescription += Fmt.GetMeasurementFlareName(m_Data.flare); sDescription += "\r\n";
2663 ! sDescription += Fmt.GetIlluminantName(m_Data.illuminant); sDescription += "\r\n";
2671 ! sDescription += Fmt.GetStandardObserverName(m_Data.stdObserver); sDescription += "\n";
2672 ! sprintf(buf, "Backing measurement: X=%.4lf, Y=%.4lf, Z=%.4lf\n",
2673 icFtoD(m_Data.backing.X),
2674 icFtoD(m_Data.backing.Y),
2675 icFtoD(m_Data.backing.Z));
2676 sDescription += buf;
2677 ! sDescription += Fmt.GetMeasurementGeometryName(m_Data.geometry); sDescription += "\n";
2678 ! sDescription += Fmt.GetMeasurementFlareName(m_Data.flare); sDescription += "\n";
2679 ! sDescription += Fmt.GetIlluminantName(m_Data.illuminant); sDescription += "\n";
2686 sReport += icValidateNonCompliantMsg;
2687 sReport += sSigName;
2688 ! sReport += " - Invalid standard observer encoding.\r\n";
2689 rv = icMaxStatus(rv, icValidateNonCompliant);
2694 sReport += icValidateNonCompliantMsg;
2695 sReport += sSigName;
2696 ! sReport += " - Invalid standard observer encoding.\n";
2697 rv = icMaxStatus(rv, icValidateNonCompliant);
2703 sReport += icValidateNonCompliantMsg;
2704 sReport += sSigName;
2705 ! sReport += " - Invalid measurement geometry encoding.\r\n";
2706 rv = icMaxStatus(rv, icValidateNonCompliant);
2711 sReport += icValidateNonCompliantMsg;
2712 sReport += sSigName;
2713 ! sReport += " - Invalid measurement geometry encoding.\n";
2714 rv = icMaxStatus(rv, icValidateNonCompliant);
2720 sReport += icValidateNonCompliantMsg;
2721 sReport += sSigName;
2722 ! sReport += " - Invalid standard illuminant encoding.\r\n";
2723 rv = icMaxStatus(rv, icValidateNonCompliant);
2728 sReport += icValidateNonCompliantMsg;
2729 sReport += sSigName;
2730 ! sReport += " - Invalid standard illuminant encoding.\n";
2731 rv = icMaxStatus(rv, icValidateNonCompliant);
2737 for (i=m_Strings->begin(); i!=m_Strings->end(); i++) {
2738 if (i!=m_Strings->begin())
2739 ! sDescription += "\r\n";
2741 ! sprintf(szBuf, "Language = '%c%c', Region = '%c%c'\r\n",
2742 i->m_nLanguageCode>>8, i->m_nLanguageCode,
2743 i->m_nCountryCode>>8, i->m_nCountryCode);
2747 for (i=m_Strings->begin(); i!=m_Strings->end(); i++) {
2748 if (i!=m_Strings->begin())
2749 ! sDescription += "\n";
2751 ! sprintf(szBuf, "Language = '%c%c', Region = '%c%c'\n",
2752 i->m_nLanguageCode>>8, i->m_nLanguageCode,
2753 i->m_nCountryCode>>8, i->m_nCountryCode);
2757 i->GetAnsi(szBuf, nSize);
2758 sDescription += "\"";
2759 sDescription += szBuf;
2760 ! sDescription += "\"\r\n";
2765 i->GetAnsi(szBuf, nSize);
2766 sDescription += "\"";
2767 sDescription += szBuf;
2768 ! sDescription += "\"\n";
2774 if (!m_Strings->size()) {
2775 sReport += icValidateWarningMsg;
2776 sReport += sSigName;
2777 ! sReport += " - Empty tag!\r\n";
2778 rv = icMaxStatus(rv, icValidateWarning);
2782 if (!m_Strings->size()) {
2783 sReport += icValidateWarningMsg;
2784 sReport += sSigName;
2785 ! sReport += " - Empty tag!\n";
2786 rv = icMaxStatus(rv, icValidateWarning);
2794 ! sDescription = "\r\nData:\r\n";
2796 if (IsTypeAscii()) {
2797 ! sprintf(buf, "%s\r\n", (icChar*)m_pData);
2798 sDescription += buf;
2801 for (int i = 0; i<(int)m_nSize; i++) {
2802 ! sprintf(buf, "%d\r\n", m_pData[i]);
2803 sDescription += buf;
2810 ! sDescription = "\nData:\n";
2812 if (IsTypeAscii()) {
2813 ! sprintf(buf, "%s\n", (icChar*)m_pData);
2814 sDescription += buf;
2817 for (int i = 0; i<(int)m_nSize; i++) {
2818 ! sprintf(buf, "%d\n", m_pData[i]);
2819 sDescription += buf;
2825 sReport += icValidateNonCompliantMsg;
2826 sReport += sSigName;
2827 ! sReport += " - Invalid data flag encoding.\r\n";
2828 rv = icMaxStatus(rv, icValidateNonCompliant);
2833 sReport += icValidateNonCompliantMsg;
2834 sReport += sSigName;
2835 ! sReport += " - Invalid data flag encoding.\n";
2836 rv = icMaxStatus(rv, icValidateNonCompliant);
2843 sDescription = "Date = ";
2844 ! sprintf(buf, "%u-%u-%u\r\n", m_DateTime.month, m_DateTime.day, m_DateTime.year);
2845 sDescription += buf;
2847 sDescription += "Time = ";
2848 ! sprintf(buf, "%u:%u:%u\r\n", m_DateTime.hours, m_DateTime.minutes, m_DateTime.seconds);
2849 sDescription += buf;
2855 sDescription = "Date = ";
2856 ! sprintf(buf, "%u-%u-%u\n", m_DateTime.month, m_DateTime.day, m_DateTime.year);
2857 sDescription += buf;
2859 sDescription += "Time = ";
2860 ! sprintf(buf, "%u:%u:%u\n", m_DateTime.hours, m_DateTime.minutes, m_DateTime.seconds);
2861 sDescription += buf;
2869 ! sprintf(buf, "Colorant Count : %u\r\n", m_nCount);
2870 sDescription += buf;
2871 ! sDescription += "Order of Colorants:\r\n";
2873 for (int i=0; i<(int)m_nCount; i++) {
2874 ! sprintf(buf, "%u\r\n", m_pData[i]);
2875 sDescription += buf;
2882 ! sprintf(buf, "Colorant Count : %u\n", m_nCount);
2883 sDescription += buf;
2884 ! sDescription += "Order of Colorants:\n";
2886 for (int i=0; i<(int)m_nCount; i++) {
2887 ! sprintf(buf, "%u\n", m_pData[i]);
2888 sDescription += buf;
2894 sReport += icValidateWarningMsg;
2895 sReport += sSigName;
2896 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
2897 rv = icMaxStatus(rv, icValidateWarning);
2902 sReport += icValidateWarningMsg;
2903 sReport += sSigName;
2904 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
2905 rv = icMaxStatus(rv, icValidateWarning);
2910 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
2911 sReport += icValidateNonCompliantMsg;
2912 sReport += sSigName;
2913 ! sReport += " - Incorrect number of colorants.\r\n";
2914 rv = icMaxStatus(rv, icValidateNonCompliant);
2918 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
2919 sReport += icValidateNonCompliantMsg;
2920 sReport += sSigName;
2921 ! sReport += " - Incorrect number of colorants.\n";
2922 rv = icMaxStatus(rv, icValidateNonCompliant);
2927 icUInt32Number i, nLen, nMaxLen=0;
2928 icFloatNumber Lab[3];
2930 ! sprintf(buf, "BEGIN_COLORANTS %u\r\n", m_nCount);
2931 sDescription += buf;
2933 for (i=0; i<m_nCount; i++) {
2935 icUInt32Number i, nLen, nMaxLen=0;
2936 icFloatNumber Lab[3];
2938 ! sprintf(buf, "BEGIN_COLORANTS %u\n", m_nCount);
2939 sDescription += buf;
2941 for (i=0; i<m_nCount; i++) {
2944 sDescription += "# NAME ";
2946 if (m_PCS == icSigXYZData) {
2947 ! sprintf(buf, "XYZ_X XYZ_Y XYZ_Z\r\n");
2948 sDescription += buf;
2951 ! sprintf(buf, "Lab_L Lab_a Lab_b\r\n");
2952 sDescription += buf;
2954 for (i=0; i<m_nCount; i++) {
2956 sDescription += "# NAME ";
2958 if (m_PCS == icSigXYZData) {
2959 ! sprintf(buf, "XYZ_X XYZ_Y XYZ_Z\n");
2960 sDescription += buf;
2963 ! sprintf(buf, "Lab_L Lab_a Lab_b\n");
2964 sDescription += buf;
2966 for (i=0; i<m_nCount; i++) {
2969 sDescription += buf;
2971 if (m_PCS == icSigXYZData) {
2972 ! 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]));
2973 sDescription += buf;
2977 sDescription += buf;
2979 if (m_PCS == icSigXYZData) {
2980 ! 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]));
2981 sDescription += buf;
2986 Lab[1] = icU16toF(m_pData[i].data[1]);
2987 Lab[2] = icU16toF(m_pData[i].data[2]);
2989 ! sprintf(buf, "%7.4lf %8.4lf %8.4lf\r\n", Lab[0], Lab[1], Lab[2]);
2990 sDescription += buf;
2994 Lab[1] = icU16toF(m_pData[i].data[1]);
2995 Lab[2] = icU16toF(m_pData[i].data[2]);
2997 ! sprintf(buf, "%7.4lf %8.4lf %8.4lf\n", Lab[0], Lab[1], Lab[2]);
2998 sDescription += buf;
3004 sReport += icValidateWarningMsg;
3005 sReport += sSigName;
3006 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
3007 rv = icMaxStatus(rv, icValidateWarning);
3012 sReport += icValidateWarningMsg;
3013 sReport += sSigName;
3014 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
3015 rv = icMaxStatus(rv, icValidateWarning);
3020 if (pProfile->m_Header.deviceClass!=icSigLinkClass) {
3021 sReport += icValidateNonCompliantMsg;
3022 sReport += sSigName;
3023 ! sReport += " - Use of this tag is allowed only in DeviceLink Profiles.\r\n";
3024 rv = icMaxStatus(rv, icValidateNonCompliant);
3028 if (pProfile->m_Header.deviceClass!=icSigLinkClass) {
3029 sReport += icValidateNonCompliantMsg;
3030 sReport += sSigName;
3031 ! sReport += " - Use of this tag is allowed only in DeviceLink Profiles.\n";
3032 rv = icMaxStatus(rv, icValidateNonCompliant);
3037 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3038 sReport += icValidateNonCompliantMsg;
3039 sReport += sSigName;
3040 ! sReport += " - Incorrect number of colorants.\r\n";
3041 rv = icMaxStatus(rv, icValidateNonCompliant);
3045 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3046 sReport += icValidateNonCompliantMsg;
3047 sReport += sSigName;
3048 ! sReport += " - Incorrect number of colorants.\n";
3049 rv = icMaxStatus(rv, icValidateNonCompliant);
3057 ! sprintf(buf, "Illuminant Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\r\n",
3058 icFtoD(m_XYZIllum.X),
3059 icFtoD(m_XYZIllum.Y),
3060 icFtoD(m_XYZIllum.Z));
3061 sDescription += buf;
3063 ! sprintf(buf, "Surround Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\r\n",
3064 icFtoD(m_XYZSurround.X),
3065 icFtoD(m_XYZSurround.Y),
3066 icFtoD(m_XYZSurround.Z));
3071 ! sprintf(buf, "Illuminant Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\n",
3072 icFtoD(m_XYZIllum.X),
3073 icFtoD(m_XYZIllum.Y),
3074 icFtoD(m_XYZIllum.Z));
3075 sDescription += buf;
3077 ! sprintf(buf, "Surround Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\n",
3078 icFtoD(m_XYZSurround.X),
3079 icFtoD(m_XYZSurround.Y),
3080 icFtoD(m_XYZSurround.Z));
3083 sDescription += "Illuminant Type: ";
3085 sDescription += Fmt.GetIlluminantName(m_illumType);
3086 ! sDescription += "\r\n";
3091 sDescription += "Illuminant Type: ";
3093 sDescription += Fmt.GetIlluminantName(m_illumType);
3094 ! sDescription += "\n";
3100 icChar buf[128], buf2[28];
3101 icUInt32Number count=0;
3103 ! sprintf(buf, "Number of Profile Description Structures: %u\r\n", m_Descriptions->size());
3104 sDescription += buf;
3106 for (i=m_Descriptions->begin(); i!=m_Descriptions->end(); i++, count++) {
3107 ! sDescription += "\r\n";
3109 ! sprintf(buf, "Profile Description Structure Number [%u] follows:\r\n", count+1);
3110 sDescription += buf;
3112 ! sprintf(buf, "Device Manufacturer Signature: %s\r\n", icGetSig(buf2, i->m_deviceMfg, false));
3113 sDescription += buf;
3115 ! sprintf(buf, "Device Model Signature: %s\r\n", icGetSig(buf2, i->m_deviceModel, false));
3116 sDescription += buf;
3118 ! sprintf(buf, "Device Attributes: %08x%08x\r\n", (icUInt32Number)(i->m_attributes >> 32), (icUInt32Number)(i->m_attributes));
3119 sDescription += buf;
3121 ! sprintf(buf, "Device Technology Signature: %s\r\n", icGetSig(buf2, i->m_technology, false));
3122 sDescription += buf;
3124 ! sprintf(buf, "Description of device manufacturer: \r\n");
3125 sDescription += buf;
3126 i->m_deviceMfgDesc.Describe(sDescription);
3128 ! sprintf(buf, "Description of device model: \r\n");
3129 sDescription += buf;
3130 i->m_deviceModelDesc.Describe(sDescription);
3133 icChar buf[128], buf2[28];
3134 icUInt32Number count=0;
3136 ! sprintf(buf, "Number of Profile Description Structures: %u\n", m_Descriptions->size());
3137 sDescription += buf;
3139 for (i=m_Descriptions->begin(); i!=m_Descriptions->end(); i++, count++) {
3140 ! sDescription += "\n";
3142 ! sprintf(buf, "Profile Description Structure Number [%u] follows:\n", count+1);
3143 sDescription += buf;
3145 ! sprintf(buf, "Device Manufacturer Signature: %s\n", icGetSig(buf2, i->m_deviceMfg, false));
3146 sDescription += buf;
3148 ! sprintf(buf, "Device Model Signature: %s\n", icGetSig(buf2, i->m_deviceModel, false));
3149 sDescription += buf;
3151 ! sprintf(buf, "Device Attributes: %08x%08x\n", (icUInt32Number)(i->m_attributes >> 32), (icUInt32Number)(i->m_attributes));
3152 sDescription += buf;
3154 ! sprintf(buf, "Device Technology Signature: %s\n", icGetSig(buf2, i->m_technology, false));
3155 sDescription += buf;
3157 ! sprintf(buf, "Description of device manufacturer: \n");
3158 sDescription += buf;
3159 i->m_deviceMfgDesc.Describe(sDescription);
3161 ! sprintf(buf, "Description of device model: \n");
3162 sDescription += buf;
3163 i->m_deviceModelDesc.Describe(sDescription);
3168 sReport += icValidateNonCompliantMsg;
3169 sReport += sSigName;
3170 ! sprintf(buf, " - %s: Unknown Technology.\r\n", Info.GetSigName(i->m_technology));
3172 rv = icMaxStatus(rv, icValidateNonCompliant);
3176 sReport += icValidateNonCompliantMsg;
3177 sReport += sSigName;
3178 ! sprintf(buf, " - %s: Unknown Technology.\n", Info.GetSigName(i->m_technology));
3180 rv = icMaxStatus(rv, icValidateNonCompliant);
3184 sReport += icValidateNonCompliantMsg;
3185 sReport += sSigName;
3187 ! sReport += " Contains non-aligned deviceMfgDesc text tag information\r\n";
3189 rv = icMaxStatus(rv, icValidateNonCompliant);
3192 sReport += icValidateNonCompliantMsg;
3193 sReport += sSigName;
3195 ! sReport += " Contains non-aligned deviceMfgDesc text tag information\n";
3197 rv = icMaxStatus(rv, icValidateNonCompliant);
3201 sReport += icValidateNonCompliantMsg;
3202 sReport += sSigName;
3204 ! sReport += " Contains non-aligned deviceModelDesc text tag information\r\n";
3206 rv = icMaxStatus(rv, icValidateNonCompliant);
3209 sReport += icValidateNonCompliantMsg;
3210 sReport += sSigName;
3212 ! sReport += " Contains non-aligned deviceModelDesc text tag information\n";
3214 rv = icMaxStatus(rv, icValidateNonCompliant);
3218 CIccResponse16List::iterator j;
3220 sDescription += "Measurement Unit: ";
3221 ! sDescription += Fmt.GetMeasurementUnit((icSignature)GetMeasurementType()); sDescription += "\r\n";
3224 for (int i=0; i<m_nChannels; i++) {
3225 nResponseList = m_Response16ListArray[i];
3227 ! sDescription += "\r\n";
3228 ! sprintf(buf, "Maximum Colorant XYZ Measurement for Channel-%u : X=%.4lf, Y=%.4lf, Z=%.4lf\r\n", i+1,
3229 icFtoD(m_maxColorantXYZ[i].X), icFtoD(m_maxColorantXYZ[i].Y), icFtoD(m_maxColorantXYZ[i].Z));
3230 sDescription += buf;
3232 ! sprintf(buf, "Number of Measurements for Channel-%u : %u\r\n", i+1, nResponseList.size());
3233 sDescription += buf;
3235 ! sprintf(buf, "Measurement Data for Channel-%u follows:\r\n", i+1);
3236 sDescription += buf;
3238 for (j=nResponseList.begin(); j!=nResponseList.end(); j++) {
3239 ! sprintf(buf, "Device Value= %u : Measurement Value= %.4lf\r\n", j->deviceCode, icFtoD(j->measurementValue));
3240 sDescription += buf;
3244 CIccResponse16List::iterator j;
3246 sDescription += "Measurement Unit: ";
3247 ! sDescription += Fmt.GetMeasurementUnit((icSignature)GetMeasurementType()); sDescription += "\n";
3250 for (int i=0; i<m_nChannels; i++) {
3251 nResponseList = m_Response16ListArray[i];
3253 ! sDescription += "\n";
3254 ! sprintf(buf, "Maximum Colorant XYZ Measurement for Channel-%u : X=%.4lf, Y=%.4lf, Z=%.4lf\n", i+1,
3255 icFtoD(m_maxColorantXYZ[i].X), icFtoD(m_maxColorantXYZ[i].Y), icFtoD(m_maxColorantXYZ[i].Z));
3256 sDescription += buf;
3258 ! sprintf(buf, "Number of Measurements for Channel-%u : %u\n", i+1, nResponseList.size());
3259 sDescription += buf;
3261 ! sprintf(buf, "Measurement Data for Channel-%u follows:\n", i+1);
3262 sDescription += buf;
3264 for (j=nResponseList.begin(); j!=nResponseList.end(); j++) {
3265 ! sprintf(buf, "Device Value= %u : Measurement Value= %.4lf\n", j->deviceCode, icFtoD(j->measurementValue));
3266 sDescription += buf;
3272 sReport += icValidateNonCompliantMsg;
3273 sReport += sSigName;
3274 ! sReport += " - Unknown measurement unit signature.\r\n";
3275 rv = icMaxStatus(rv, icValidateNonCompliant);
3280 sReport += icValidateNonCompliantMsg;
3281 sReport += sSigName;
3282 ! sReport += " - Unknown measurement unit signature.\n";
3283 rv = icMaxStatus(rv, icValidateNonCompliant);
3289 sReport += icValidateNonCompliantMsg;
3290 sReport += sSigName;
3291 ! sReport += " - Incorrect number of channels.\r\n";
3292 rv = icMaxStatus(rv, icValidateNonCompliant);
3297 sReport += icValidateNonCompliantMsg;
3298 sReport += sSigName;
3299 ! sReport += " - Incorrect number of channels.\n";
3300 rv = icMaxStatus(rv, icValidateNonCompliant);
3305 CIccResponseCurveSet::iterator i;
3308 ! sprintf(buf, "Number of Channels: %u\r\n", m_nChannels);
3309 sDescription += buf;
3311 ! sprintf(buf, "Number of Measurement Types used: %u\r\n", m_ResponseCurves->size());
3312 sDescription += buf;
3315 for (i=m_ResponseCurves->begin(); i!=m_ResponseCurves->end(); i++, count++) {
3316 ! sDescription += "\r\n";
3318 ! sprintf(buf, "Response Curve for measurement type [%u] follows:\r\n", count+1);
3319 sDescription += buf;
3321 i->Describe(sDescription);
3323 CIccResponseCurveSet::iterator i;
3326 ! sprintf(buf, "Number of Channels: %u\n", m_nChannels);
3327 sDescription += buf;
3329 ! sprintf(buf, "Number of Measurement Types used: %u\n", m_ResponseCurves->size());
3330 sDescription += buf;
3333 for (i=m_ResponseCurves->begin(); i!=m_ResponseCurves->end(); i++, count++) {
3334 ! sDescription += "\n";
3336 ! sprintf(buf, "Response Curve for measurement type [%u] follows:\n", count+1);
3337 sDescription += buf;
3339 i->Describe(sDescription);
3343 sReport += icValidateWarningMsg;
3344 sReport += sSigName;
3345 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
3346 rv = icMaxStatus(rv, icValidateWarning);
3351 sReport += icValidateWarningMsg;
3352 sReport += sSigName;
3353 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
3354 rv = icMaxStatus(rv, icValidateWarning);
3359 if (m_nChannels!=icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3360 sReport += icValidateWarningMsg;
3361 sReport += sSigName;
3362 ! sReport += " - Incorrect number of channels.\r\n";
3365 if (!GetNumResponseCurveTypes()) {
3366 sReport += icValidateWarningMsg;
3367 sReport += sSigName;
3368 ! sReport += " - Empty Tag!.\r\n";
3369 rv = icMaxStatus(rv, icValidateWarning);
3373 if (m_nChannels!=icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3374 sReport += icValidateWarningMsg;
3375 sReport += sSigName;
3376 ! sReport += " - Incorrect number of channels.\n";
3379 if (!GetNumResponseCurveTypes()) {
3380 sReport += icValidateWarningMsg;
3381 sReport += sSigName;
3382 ! sReport += " - Empty Tag!.\n";
3383 rv = icMaxStatus(rv, icValidateWarning);
3386 *** misc/SampleICC-1.3.2/IccProfLib/IccTagLut.cpp Mon Aug 20 22:05:00 2007
3387 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagLut.cpp Fri Jan 25 14:23:09 2008
3390 icChar buf[128], *ptr;
3393 ! sprintf(buf, "BEGIN_CURVE In_Out\r\n");
3394 sDescription += buf;
3395 ! sDescription += "Y = X\r\n";
3397 else if (m_nSize==1) {
3398 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3399 ! sprintf(buf, "BEGIN_CURVE In_Out\r\n");
3400 sDescription += buf;
3401 ! sprintf(buf, "Y = X ^ %.4lf\r\n", dGamma);
3402 sDescription += buf;
3407 ! sprintf(buf, "BEGIN_LUT In_Out 1 1\r\n");
3408 sDescription += buf;
3409 ! sDescription += "IN OUT\r\n";
3411 for (i=0; i<(int)m_nSize; i++) {
3414 icChar buf[128], *ptr;
3417 ! sprintf(buf, "BEGIN_CURVE In_Out\n");
3418 sDescription += buf;
3419 ! sDescription += "Y = X\n";
3421 else if (m_nSize==1) {
3422 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3423 ! sprintf(buf, "BEGIN_CURVE In_Out\n");
3424 sDescription += buf;
3425 ! sprintf(buf, "Y = X ^ %.4lf\n", dGamma);
3426 sDescription += buf;
3431 ! sprintf(buf, "BEGIN_LUT In_Out 1 1\n");
3432 sDescription += buf;
3433 ! sDescription += "IN OUT\n";
3435 for (i=0; i<(int)m_nSize; i++) {
3442 ! strcpy(ptr, "\r\n");
3444 sDescription += buf;
3447 ! sDescription += "\r\n";
3455 ! strcpy(ptr, "\n");
3457 sDescription += buf;
3460 ! sDescription += "\n";
3466 icChar buf[128], *ptr;
3469 ! sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
3470 sDescription += buf;
3471 ! sDescription += "Y = X\r\n";
3473 else if (m_nSize==1) {
3474 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3475 ! sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
3476 sDescription += buf;
3477 ! sprintf(buf, "Y = X ^ %.4lf\r\n", dGamma);
3478 sDescription += buf;
3483 ! sprintf(buf, "BEGIN_LUT %s 1 1\r\n", szName);
3484 sDescription += buf;
3485 ! sDescription += "IN OUT\r\n";
3487 sDescription.reserve(sDescription.size() + m_nSize * 20);
3490 icChar buf[128], *ptr;
3493 ! sprintf(buf, "BEGIN_CURVE %s\n", szName);
3494 sDescription += buf;
3495 ! sDescription += "Y = X\n";
3497 else if (m_nSize==1) {
3498 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3499 ! sprintf(buf, "BEGIN_CURVE %s\n", szName);
3500 sDescription += buf;
3501 ! sprintf(buf, "Y = X ^ %.4lf\n", dGamma);
3502 sDescription += buf;
3507 ! sprintf(buf, "BEGIN_LUT %s 1 1\n", szName);
3508 sDescription += buf;
3509 ! sDescription += "IN OUT\n";
3511 sDescription.reserve(sDescription.size() + m_nSize * 20);
3518 ! strcpy(ptr, "\r\n");
3520 sDescription += buf;
3523 ! sDescription += "\r\n";
3531 ! strcpy(ptr, "\n");
3533 sDescription += buf;
3536 ! sDescription += "\n";
3542 if (m_Curve[0]>0.0 || m_Curve[m_nSize-1]<1.0) {
3543 sReport += icValidateWarningMsg;
3544 sReport += sSigName;
3545 ! sReport += " - Curve cannot be accurately inverted.\r\n";
3546 rv = icMaxStatus(rv, icValidateWarning);
3550 if (m_Curve[0]>0.0 || m_Curve[m_nSize-1]<1.0) {
3551 sReport += icValidateWarningMsg;
3552 sReport += sSigName;
3553 ! sReport += " - Curve cannot be accurately inverted.\n";
3554 rv = icMaxStatus(rv, icValidateWarning);
3562 ! sprintf(buf, "FunctionType: %04Xh\r\n", m_nFunctionType);
3563 sDescription += buf;
3565 switch(m_nFunctionType) {
3567 ! sprintf(buf, "Y = X ^ %.4lf\r\n", icFtoD(m_Param[0]));
3568 sDescription += buf;
3572 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf / %.4lf)\r\n",
3573 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3574 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3575 sDescription += buf;
3577 ! sprintf(buf, "Y = 0 when (X < %.4lf / %.4lf)\r\n",
3578 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3579 sDescription += buf;
3583 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf / %.4lf)\r\n",
3584 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3586 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3587 sDescription += buf;
3589 ! sprintf(buf, "Y = %.4lf when (X < %.4lf / %.4lf)\r\n", icFtoD(m_Param[3]),
3590 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3591 sDescription += buf;
3595 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf)\r\n",
3596 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3597 icFtoD(m_Param[4]));
3598 sDescription += buf;
3600 ! sprintf(buf, "Y = %lf * X when (X < %.4lf)\r\n",
3601 icFtoD(m_Param[3]), icFtoD(m_Param[4]));
3602 sDescription += buf;
3606 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf)\r\n",
3607 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3608 icFtoD(m_Param[5]), icFtoD(m_Param[4]));
3609 sDescription += buf;
3611 ! sprintf(buf, "Y = %lf * X + %.4lf when (X < %.4lf)\r\n",
3612 icFtoD(m_Param[3]), icFtoD(m_Param[6]), icFtoD(m_Param[4]));
3613 sDescription += buf;
3619 ! sprintf(buf, "FunctionType: %04Xh\n", m_nFunctionType);
3620 sDescription += buf;
3622 switch(m_nFunctionType) {
3624 ! sprintf(buf, "Y = X ^ %.4lf\n", icFtoD(m_Param[0]));
3625 sDescription += buf;
3629 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf / %.4lf)\n",
3630 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3631 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3632 sDescription += buf;
3634 ! sprintf(buf, "Y = 0 when (X < %.4lf / %.4lf)\n",
3635 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3636 sDescription += buf;
3640 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf / %.4lf)\n",
3641 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3643 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3644 sDescription += buf;
3646 ! sprintf(buf, "Y = %.4lf when (X < %.4lf / %.4lf)\n", icFtoD(m_Param[3]),
3647 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3648 sDescription += buf;
3652 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf)\n",
3653 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3654 icFtoD(m_Param[4]));
3655 sDescription += buf;
3657 ! sprintf(buf, "Y = %lf * X when (X < %.4lf)\n",
3658 icFtoD(m_Param[3]), icFtoD(m_Param[4]));
3659 sDescription += buf;
3663 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf)\n",
3664 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3665 icFtoD(m_Param[5]), icFtoD(m_Param[4]));
3666 sDescription += buf;
3668 ! sprintf(buf, "Y = %lf * X + %.4lf when (X < %.4lf)\n",
3669 icFtoD(m_Param[3]), icFtoD(m_Param[6]), icFtoD(m_Param[4]));
3670 sDescription += buf;
3677 ! sprintf(buf, "Unknown Function with %d parameters:\r\n");
3678 sDescription += buf;
3680 for (i=0; i<m_nNumParam; i++) {
3681 ! sprintf(buf, "Param[%d] = %.4lf\r\n", i, icFtoD(m_Param[i]));
3682 sDescription += buf;
3689 ! sprintf(buf, "Unknown Function with %d parameters:\n", m_nNumParam);
3690 sDescription += buf;
3692 for (i=0; i<m_nNumParam; i++) {
3693 ! sprintf(buf, "Param[%d] = %.4lf\n", i, icFtoD(m_Param[i]));
3694 sDescription += buf;
3702 ! sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
3703 sDescription += buf;
3704 Describe(sDescription);
3705 ! sDescription += "\r\n";
3713 ! sprintf(buf, "BEGIN_CURVE %s\n", szName);
3714 sDescription += buf;
3715 Describe(sDescription);
3716 ! sDescription += "\n";
3722 if (m_nReserved2!=0) {
3723 sReport += icValidateNonCompliantMsg;
3724 sReport += sSigName;
3725 ! sReport += " - Reserved Value must be zero.\r\n";
3727 rv = icMaxStatus(rv, icValidateNonCompliant);
3730 if (m_nReserved2!=0) {
3731 sReport += icValidateNonCompliantMsg;
3732 sReport += sSigName;
3733 ! sReport += " - Reserved Value must be zero.\n";
3735 rv = icMaxStatus(rv, icValidateNonCompliant);
3739 if (m_nNumParam!=1) {
3740 sReport += icValidateCriticalErrorMsg;
3741 sReport += sSigName;
3742 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3743 rv = icMaxStatus(rv, icValidateCriticalError);
3747 if (m_nNumParam!=1) {
3748 sReport += icValidateCriticalErrorMsg;
3749 sReport += sSigName;
3750 ! sReport += " - Number of parameters inconsistent with function type.\n";
3751 rv = icMaxStatus(rv, icValidateCriticalError);
3756 if (m_nNumParam!=3) {
3757 sReport += icValidateCriticalErrorMsg;
3758 sReport += sSigName;
3759 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3760 rv = icMaxStatus(rv, icValidateCriticalError);
3764 if (m_nNumParam!=3) {
3765 sReport += icValidateCriticalErrorMsg;
3766 sReport += sSigName;
3767 ! sReport += " - Number of parameters inconsistent with function type.\n";
3768 rv = icMaxStatus(rv, icValidateCriticalError);
3773 if (m_nNumParam!=4) {
3774 sReport += icValidateCriticalErrorMsg;
3775 sReport += sSigName;
3776 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3777 rv = icMaxStatus(rv, icValidateCriticalError);
3781 if (m_nNumParam!=4) {
3782 sReport += icValidateCriticalErrorMsg;
3783 sReport += sSigName;
3784 ! sReport += " - Number of parameters inconsistent with function type.\n";
3785 rv = icMaxStatus(rv, icValidateCriticalError);
3790 if (m_nNumParam!=5) {
3791 sReport += icValidateCriticalErrorMsg;
3792 sReport += sSigName;
3793 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3794 rv = icMaxStatus(rv, icValidateCriticalError);
3798 if (m_nNumParam!=5) {
3799 sReport += icValidateCriticalErrorMsg;
3800 sReport += sSigName;
3801 ! sReport += " - Number of parameters inconsistent with function type.\n";
3802 rv = icMaxStatus(rv, icValidateCriticalError);
3807 if (m_nNumParam!=7) {
3808 sReport += icValidateCriticalErrorMsg;
3809 sReport += sSigName;
3810 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3811 rv = icMaxStatus(rv, icValidateCriticalError);
3815 if (m_nNumParam!=7) {
3816 sReport += icValidateCriticalErrorMsg;
3817 sReport += sSigName;
3818 ! sReport += " - Number of parameters inconsistent with function type.\n";
3819 rv = icMaxStatus(rv, icValidateCriticalError);
3825 sReport += icValidateCriticalErrorMsg;
3826 sReport += sSigName;
3827 ! sReport += " - Unknown function type.\r\n";
3828 rv = icMaxStatus(rv, icValidateCriticalError);
3833 sReport += icValidateCriticalErrorMsg;
3834 sReport += sSigName;
3835 ! sReport += " - Unknown function type.\n";
3836 rv = icMaxStatus(rv, icValidateCriticalError);
3841 if (lval>0.0 || uval<1.0) {
3842 sReport += icValidateWarningMsg;
3843 sReport += sSigName;
3844 ! sReport += " - Curve cannot be accurately inverted.\r\n";
3845 rv = icMaxStatus(rv, icValidateWarning);
3849 if (lval>0.0 || uval<1.0) {
3850 sReport += icValidateWarningMsg;
3851 sReport += sSigName;
3852 ! sReport += " - Curve cannot be accurately inverted.\n";
3853 rv = icMaxStatus(rv, icValidateWarning);
3861 ! sprintf(buf, "BEGIN_MATRIX %s\r\n", szName);
3862 sDescription += buf;
3864 if (!m_bUseConstants) {
3865 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
3866 m_e[0], m_e[1], m_e[2]);
3867 sDescription += buf;
3868 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
3869 m_e[3], m_e[4], m_e[5]);
3870 sDescription += buf;
3871 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
3872 m_e[6], m_e[7], m_e[8]);
3873 sDescription += buf;
3876 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
3877 m_e[0], m_e[1], m_e[2], m_e[9]);
3878 sDescription += buf;
3879 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
3880 m_e[3], m_e[4], m_e[5], m_e[10]);
3881 sDescription += buf;
3882 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
3883 m_e[6], m_e[7], m_e[8], m_e[11]);
3884 sDescription += buf;
3886 ! sDescription += "\r\n";
3894 ! sprintf(buf, "BEGIN_MATRIX %s\n", szName);
3895 sDescription += buf;
3897 if (!m_bUseConstants) {
3898 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
3899 m_e[0], m_e[1], m_e[2]);
3900 sDescription += buf;
3901 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
3902 m_e[3], m_e[4], m_e[5]);
3903 sDescription += buf;
3904 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
3905 m_e[6], m_e[7], m_e[8]);
3906 sDescription += buf;
3909 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
3910 m_e[0], m_e[1], m_e[2], m_e[9]);
3911 sDescription += buf;
3912 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
3913 m_e[3], m_e[4], m_e[5], m_e[10]);
3914 sDescription += buf;
3915 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
3916 m_e[6], m_e[7], m_e[8], m_e[11]);
3917 sDescription += buf;
3919 ! sDescription += "\n";
3925 if (m_e[0]!=1.0 || m_e[4]!=1.0 || m_e[9]!=1.0 || sum!=3.0) {
3926 sReport += icValidateNonCompliantMsg;
3927 sReport += sSigName;
3928 ! sReport += " - Matrix must be identity.\r\n";
3929 rv = icValidateNonCompliant;
3933 if (m_e[0]!=1.0 || m_e[4]!=1.0 || m_e[9]!=1.0 || sum!=3.0) {
3934 sReport += icValidateNonCompliantMsg;
3935 sReport += sSigName;
3936 ! sReport += " - Matrix must be identity.\n";
3937 rv = icValidateNonCompliant;
3943 ptr += sprintf(ptr, " %s", m_pVal);
3945 ! strcpy(ptr, "\r\n");
3946 sDescription += (const icChar*)m_pOutText;
3951 ptr += sprintf(ptr, " %s", m_pVal);
3953 ! strcpy(ptr, "\n");
3954 sDescription += (const icChar*)m_pOutText;
3959 icChar szOutText[2048], szColor[40];
3962 ! sprintf(szOutText, "BEGIN_LUT %s %d %d\r\n", szName, m_nInput, m_nOutput);
3963 sDescription += szOutText;
3965 for (i=0; i<m_nInput; i++) {
3967 icChar szOutText[2048], szColor[40];
3970 ! sprintf(szOutText, "BEGIN_LUT %s %d %d\n", szName, m_nInput, m_nOutput);
3971 sDescription += szOutText;
3973 for (i=0; i<m_nInput; i++) {
3976 sDescription += szOutText;
3979 ! sDescription += "\r\n";
3982 for (i=0; i<m_nInput; i++) {
3984 sDescription += szOutText;
3987 ! sDescription += "\n";
3990 for (i=0; i<m_nInput; i++) {
3994 Iterate(sDescription, 0, 0);
3996 ! sDescription += "\r\n";
4002 Iterate(sDescription, 0, 0);
4004 ! sDescription += "\n";
4010 if (m_nReserved2[0]!=0 || m_nReserved2[1]!=0 || m_nReserved2[2]!=0) {
4011 sReport += icValidateNonCompliantMsg;
4012 sReport += sSigName;
4013 ! sReport += " - Reserved Value must be zero.\r\n";
4015 rv = icValidateNonCompliant;
4018 if (m_nReserved2[0]!=0 || m_nReserved2[1]!=0 || m_nReserved2[2]!=0) {
4019 sReport += icValidateNonCompliantMsg;
4020 sReport += sSigName;
4021 ! sReport += " - Reserved Value must be zero.\n";
4023 rv = icValidateNonCompliant;
4027 if (m_GridPoints[i]<2) {
4028 sReport += icValidateCriticalErrorMsg;
4029 sReport += sSigName;
4030 ! sprintf(temp, " - CLUT: At least 2 grid points should be present in dimension %u.\r\n",i );
4032 rv = icMaxStatus(rv, icValidateCriticalError);
4035 if (m_GridPoints[i]<2) {
4036 sReport += icValidateCriticalErrorMsg;
4037 sReport += sSigName;
4038 ! sprintf(temp, " - CLUT: At least 2 grid points should be present in dimension %u.\n",i );
4040 rv = icMaxStatus(rv, icValidateCriticalError);
4045 sReport += icValidateWarningMsg;
4046 sReport += sSigName;
4047 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
4048 rv = icMaxStatus(rv, icValidateWarning);
4053 sReport += icValidateWarningMsg;
4054 sReport += sSigName;
4055 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
4056 rv = icMaxStatus(rv, icValidateWarning);
4061 if (m_nInput!=nInput) {
4062 sReport += icValidateCriticalErrorMsg;
4063 sReport += sSigName;
4064 ! sReport += " - Incorrect number of input channels.\r\n";
4065 rv = icMaxStatus(rv, icValidateCriticalError);
4069 if (m_nInput!=nInput) {
4070 sReport += icValidateCriticalErrorMsg;
4071 sReport += sSigName;
4072 ! sReport += " - Incorrect number of input channels.\n";
4073 rv = icMaxStatus(rv, icValidateCriticalError);
4078 if (m_nOutput!=nOutput) {
4079 sReport += icValidateCriticalErrorMsg;
4080 sReport += sSigName;
4081 ! sReport += " - Incorrect number of output channels.\r\n";
4082 rv = icMaxStatus(rv, icValidateCriticalError);
4086 if (m_nOutput!=nOutput) {
4087 sReport += icValidateCriticalErrorMsg;
4088 sReport += sSigName;
4089 ! sReport += " - Incorrect number of output channels.\n";
4090 rv = icMaxStatus(rv, icValidateCriticalError);
4095 if (m_nInput!=nInput) {
4096 sReport += icValidateCriticalErrorMsg;
4097 sReport += sSigName;
4098 ! sReport += " - Incorrect number of input channels.\r\n";
4099 rv = icMaxStatus(rv, icValidateCriticalError);
4103 if (m_nInput!=nInput) {
4104 sReport += icValidateCriticalErrorMsg;
4105 sReport += sSigName;
4106 ! sReport += " - Incorrect number of input channels.\n";
4107 rv = icMaxStatus(rv, icValidateCriticalError);
4112 if (m_nOutput!=nOutput) {
4113 sReport += icValidateCriticalErrorMsg;
4114 sReport += sSigName;
4115 ! sReport += " - Incorrect number of output channels.\r\n";
4116 rv = icMaxStatus(rv, icValidateCriticalError);
4120 if (m_nOutput!=nOutput) {
4121 sReport += icValidateCriticalErrorMsg;
4122 sReport += sSigName;
4123 ! sReport += " - Incorrect number of output channels.\n";
4124 rv = icMaxStatus(rv, icValidateCriticalError);
4129 if (m_nInput!=nInput) {
4130 sReport += icValidateCriticalErrorMsg;
4131 sReport += sSigName;
4132 ! sReport += " - Incorrect number of input channels.\r\n";
4133 rv = icMaxStatus(rv, icValidateCriticalError);
4137 if (m_nInput!=nInput) {
4138 sReport += icValidateCriticalErrorMsg;
4139 sReport += sSigName;
4140 ! sReport += " - Incorrect number of input channels.\n";
4141 rv = icMaxStatus(rv, icValidateCriticalError);
4146 if (m_nOutput!=nOutput) {
4147 sReport += icValidateCriticalErrorMsg;
4148 sReport += sSigName;
4149 ! sReport += " - Incorrect number of output channels.\r\n";
4150 rv = icMaxStatus(rv, icValidateCriticalError);
4154 if (m_nOutput!=nOutput) {
4155 sReport += icValidateCriticalErrorMsg;
4156 sReport += sSigName;
4157 ! sReport += " - Incorrect number of output channels.\n";
4158 rv = icMaxStatus(rv, icValidateCriticalError);
4164 sReport += icValidateCriticalErrorMsg;
4165 sReport += sSigName;
4166 ! sReport += " - CLUT must be present.\r\n";
4167 rv = icMaxStatus(rv, icValidateCriticalError);
4172 sReport += icValidateCriticalErrorMsg;
4173 sReport += sSigName;
4174 ! sReport += " - CLUT must be present.\n";
4175 rv = icMaxStatus(rv, icValidateCriticalError);
4181 sReport += icValidateCriticalErrorMsg;
4182 sReport += sSigName;
4183 ! sReport += " - Incorrect number of B-curves.\r\n";
4184 rv = icMaxStatus(rv, icValidateCriticalError);
4189 sReport += icValidateCriticalErrorMsg;
4190 sReport += sSigName;
4191 ! sReport += " - Incorrect number of B-curves.\n";
4192 rv = icMaxStatus(rv, icValidateCriticalError);
4198 sReport += icValidateCriticalErrorMsg;
4199 sReport += sSigName;
4200 ! sReport += " - Incorrect number of M-curves.\r\n";
4201 rv = icMaxStatus(rv, icValidateCriticalError);
4206 sReport += icValidateCriticalErrorMsg;
4207 sReport += sSigName;
4208 ! sReport += " - Incorrect number of M-curves.\n";
4209 rv = icMaxStatus(rv, icValidateCriticalError);
4215 sReport += icValidateNonCompliantMsg;
4216 sReport += sSigName;
4217 ! sReport += " - CLUT must be present if using A-curves.\r\n";
4219 rv = icMaxStatus(rv, icValidateNonCompliant);
4223 sReport += icValidateNonCompliantMsg;
4224 sReport += sSigName;
4225 ! sReport += " - CLUT must be present if using A-curves.\n";
4227 rv = icMaxStatus(rv, icValidateNonCompliant);
4232 sReport += icValidateCriticalErrorMsg;
4233 sReport += sSigName;
4234 ! sReport += " - Incorrect number of A-curves.\r\n";
4235 rv = icMaxStatus(rv, icValidateCriticalError);
4240 sReport += icValidateCriticalErrorMsg;
4241 sReport += sSigName;
4242 ! sReport += " - Incorrect number of A-curves.\n";
4243 rv = icMaxStatus(rv, icValidateCriticalError);
4249 sReport += icValidateWarningMsg;
4250 sReport += sSigName;
4251 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
4252 rv = icMaxStatus(rv, icValidateCriticalError);
4257 sReport += icValidateWarningMsg;
4258 sReport += sSigName;
4259 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
4260 rv = icMaxStatus(rv, icValidateCriticalError);
4265 if (m_nOutput!=nOutput) {
4266 sReport += icValidateCriticalErrorMsg;
4267 sReport += sSigName;
4268 ! sReport += " - Incorrect number of output channels.\r\n";
4269 rv = icMaxStatus(rv, icValidateCriticalError);
4273 if (m_nOutput!=nOutput) {
4274 sReport += icValidateCriticalErrorMsg;
4275 sReport += sSigName;
4276 ! sReport += " - Incorrect number of output channels.\n";
4277 rv = icMaxStatus(rv, icValidateCriticalError);
4283 sReport += icValidateCriticalErrorMsg;
4284 sReport += sSigName;
4285 ! sReport += " - Incorrect number of B-curves.\r\n";
4286 rv = icMaxStatus(rv, icValidateCriticalError);
4291 sReport += icValidateCriticalErrorMsg;
4292 sReport += sSigName;
4293 ! sReport += " - Incorrect number of B-curves.\n";
4294 rv = icMaxStatus(rv, icValidateCriticalError);
4300 sReport += icValidateCriticalErrorMsg;
4301 sReport += sSigName;
4302 ! sReport += " - Incorrect number of M-curves.\r\n";
4303 rv = icMaxStatus(rv, icValidateCriticalError);
4308 sReport += icValidateCriticalErrorMsg;
4309 sReport += sSigName;
4310 ! sReport += " - Incorrect number of M-curves.\n";
4311 rv = icMaxStatus(rv, icValidateCriticalError);
4317 sReport += icValidateNonCompliantMsg;
4318 sReport += sSigName;
4319 ! sReport += " - CLUT must be present if using A-curves.\r\n";
4321 rv = icMaxStatus(rv, icValidateNonCompliant);
4325 sReport += icValidateNonCompliantMsg;
4326 sReport += sSigName;
4327 ! sReport += " - CLUT must be present if using A-curves.\n";
4329 rv = icMaxStatus(rv, icValidateNonCompliant);
4334 sReport += icValidateCriticalErrorMsg;
4335 sReport += sSigName;
4336 ! sReport += " - Incorrect number of A-curves.\r\n";
4337 rv = icMaxStatus(rv, icValidateCriticalError);
4342 sReport += icValidateCriticalErrorMsg;
4343 sReport += sSigName;
4344 ! sReport += " - Incorrect number of A-curves.\n";
4345 rv = icMaxStatus(rv, icValidateCriticalError);
4350 if (pTagCurve->GetSize()==1) {
4351 sReport += icValidateCriticalErrorMsg;
4352 sReport += sSigName;
4353 ! sReport += " - lut8Tags do not support single entry gamma curves.\r\n";
4354 rv = icMaxStatus(rv, icValidateCriticalError);
4358 if (pTagCurve->GetSize()==1) {
4359 sReport += icValidateCriticalErrorMsg;
4360 sReport += sSigName;
4361 ! sReport += " - lut8Tags do not support single entry gamma curves.\n";
4362 rv = icMaxStatus(rv, icValidateCriticalError);
4368 sReport += icValidateCriticalErrorMsg;
4369 sReport += sSigName;
4370 ! sReport += " - Incorrect number of B-curves.\r\n";
4371 rv = icMaxStatus(rv, icValidateCriticalError);
4376 sReport += icValidateCriticalErrorMsg;
4377 sReport += sSigName;
4378 ! sReport += " - Incorrect number of B-curves.\n";
4379 rv = icMaxStatus(rv, icValidateCriticalError);
4384 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4385 sReport += icValidateWarningMsg;
4386 sReport += sSigName;
4387 ! sReport += " - Matrix must be identity.\r\n";
4388 rv = icMaxStatus(rv, icValidateWarning);
4392 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4393 sReport += icValidateWarningMsg;
4394 sReport += sSigName;
4395 ! sReport += " - Matrix must be identity.\n";
4396 rv = icMaxStatus(rv, icValidateWarning);
4401 if (pTagCurve->GetSize()==1) {
4402 sReport += icValidateCriticalErrorMsg;
4403 sReport += sSigName;
4404 ! sReport += " - lut8Tags do not support single entry gamma curves.\r\n";
4405 rv = icMaxStatus(rv, icValidateCriticalError);
4409 if (pTagCurve->GetSize()==1) {
4410 sReport += icValidateCriticalErrorMsg;
4411 sReport += sSigName;
4412 ! sReport += " - lut8Tags do not support single entry gamma curves.\n";
4413 rv = icMaxStatus(rv, icValidateCriticalError);
4419 sReport += icValidateCriticalErrorMsg;
4420 sReport += sSigName;
4421 ! sReport += " - Incorrect number of A-curves.\r\n";
4422 rv = icMaxStatus(rv, icValidateCriticalError);
4427 sReport += icValidateCriticalErrorMsg;
4428 sReport += sSigName;
4429 ! sReport += " - Incorrect number of A-curves.\n";
4430 rv = icMaxStatus(rv, icValidateCriticalError);
4435 if (pTagCurve->GetSize()==1) {
4436 sReport += icValidateCriticalErrorMsg;
4437 sReport += sSigName;
4438 ! sReport += " - lut16Tags do not support single entry gamma curves.\r\n";
4439 rv = icMaxStatus(rv, icValidateCriticalError);
4443 if (pTagCurve->GetSize()==1) {
4444 sReport += icValidateCriticalErrorMsg;
4445 sReport += sSigName;
4446 ! sReport += " - lut16Tags do not support single entry gamma curves.\n";
4447 rv = icMaxStatus(rv, icValidateCriticalError);
4453 sReport += icValidateCriticalErrorMsg;
4454 sReport += sSigName;
4455 ! sReport += " - Incorrect number of B-curves.\r\n";
4456 rv = icMaxStatus(rv, icValidateCriticalError);
4461 sReport += icValidateCriticalErrorMsg;
4462 sReport += sSigName;
4463 ! sReport += " - Incorrect number of B-curves.\n";
4464 rv = icMaxStatus(rv, icValidateCriticalError);
4469 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4470 sReport += icValidateWarningMsg;
4471 sReport += sSigName;
4472 ! sReport += " - Matrix must be identity.\r\n";
4473 rv = icMaxStatus(rv, icValidateWarning);
4477 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4478 sReport += icValidateWarningMsg;
4479 sReport += sSigName;
4480 ! sReport += " - Matrix must be identity.\n";
4481 rv = icMaxStatus(rv, icValidateWarning);
4486 if (pTagCurve->GetSize()==1) {
4487 sReport += icValidateCriticalErrorMsg;
4488 sReport += sSigName;
4489 ! sReport += " - lut16Tags do not support single entry gamma curves.\r\n";
4490 rv = icMaxStatus(rv, icValidateCriticalError);
4494 if (pTagCurve->GetSize()==1) {
4495 sReport += icValidateCriticalErrorMsg;
4496 sReport += sSigName;
4497 ! sReport += " - lut16Tags do not support single entry gamma curves.\n";
4498 rv = icMaxStatus(rv, icValidateCriticalError);
4504 sReport += icValidateCriticalErrorMsg;
4505 sReport += sSigName;
4506 ! sReport += " - Incorrect number of A-curves.\r\n";
4507 rv = icMaxStatus(rv, icValidateCriticalError);
4512 sReport += icValidateCriticalErrorMsg;
4513 sReport += sSigName;
4514 ! sReport += " - Incorrect number of A-curves.\n";
4515 rv = icMaxStatus(rv, icValidateCriticalError);
4518 *** misc/SampleICC-1.3.2/IccProfLib/IccTagMPE.cpp Mon Aug 20 22:05:00 2007
4519 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagMPE.cpp Fri Jan 25 14:23:09 2008
4522 icGetSig(sigbuf, m_sig), m_nSize);
4523 sDescription += buf;
4525 ! sDescription += "\r\n\r\nData Follows:\r\n";
4527 icMemDump(sDescription, m_pData, m_nSize);
4530 icGetSig(sigbuf, m_sig), m_nSize);
4531 sDescription += buf;
4533 ! sDescription += "\n\nData Follows:\n";
4535 icMemDump(sDescription, m_pData, m_nSize);
4539 sReport += " - Contains unknown processing element type (";
4540 icGetSig(buf, m_sig, true);
4542 ! sReport += ").\r\n";
4544 return icValidateCriticalError;
4547 sReport += " - Contains unknown processing element type (";
4548 icGetSig(buf, m_sig, true);
4550 ! sReport += ").\n";
4552 return icValidateCriticalError;
4556 sReport += " - Element ";
4557 sSigName = Info.GetSigName(GetType());
4558 sReport += sSigName;
4559 ! sReport += " - Reserved Value must be zero.\r\n";
4561 rv = icValidateNonCompliant;
4564 sReport += " - Element ";
4565 sSigName = Info.GetSigName(GetType());
4566 sReport += sSigName;
4567 ! sReport += " - Reserved Value must be zero.\n";
4569 rv = icValidateNonCompliant;
4576 ! sprintf(buf, "BEGIN MULTI_PROCESS_ELEMENT_TAG %d %d\r\n", m_nInputChannels, m_nOutputChannels);
4577 sDescription += buf;
4578 ! sDescription += "\r\n";
4580 CIccMultiProcessElementList::iterator i;
4583 for (j=0, i=m_list->begin(); i!=m_list->end(); j++, i++) {
4584 ! sprintf(buf, "PROCESS_ELEMENT #%d\r\n", j+1);
4585 sDescription += buf;
4586 i->ptr->Describe(sDescription);
4587 ! sDescription += "\r\n";
4595 ! sprintf(buf, "BEGIN MULTI_PROCESS_ELEMENT_TAG %d %d\n", m_nInputChannels, m_nOutputChannels);
4596 sDescription += buf;
4597 ! sDescription += "\n";
4599 CIccMultiProcessElementList::iterator i;
4602 for (j=0, i=m_list->begin(); i!=m_list->end(); j++, i++) {
4603 ! sprintf(buf, "PROCESS_ELEMENT #%d\n", j+1);
4604 sDescription += buf;
4605 i->ptr->Describe(sDescription);
4606 ! sDescription += "\n";
4612 if (m_nInputChannels != m_nOutputChannels) {
4613 sReport += icValidateCriticalErrorMsg;
4614 sReport += sSigName;
4615 ! sReport += " No processing elements and input and output channels do not match!\r\n";
4616 return icValidateCriticalError;
4619 sReport += icValidateWarningMsg;
4620 sReport += sSigName;
4621 ! sReport += " No processing elements.\r\n";
4622 return icValidateWarning;
4626 if (m_nInputChannels != m_nOutputChannels) {
4627 sReport += icValidateCriticalErrorMsg;
4628 sReport += sSigName;
4629 ! sReport += " No processing elements and input and output channels do not match!\n";
4630 return icValidateCriticalError;
4633 sReport += icValidateWarningMsg;
4634 sReport += sSigName;
4635 ! sReport += " No processing elements.\n";
4636 return icValidateWarning;
4641 if (i->ptr->NumInputChannels() != m_nInputChannels) {
4642 sReport += icValidateCriticalErrorMsg;
4643 sReport += sSigName;
4644 ! sReport += " Mis-matching number of input channels!\r\n";
4645 return icValidateCriticalError;
4649 if (i->ptr->NumInputChannels() != m_nInputChannels) {
4650 sReport += icValidateCriticalErrorMsg;
4651 sReport += sSigName;
4652 ! sReport += " Mis-matching number of input channels!\n";
4653 return icValidateCriticalError;
4659 sReport += i->ptr->GetClassName();
4661 ! sReport += " Mis-matching number of channels!\r\n";
4662 return icValidateCriticalError;
4667 sReport += i->ptr->GetClassName();
4669 ! sReport += " Mis-matching number of channels!\n";
4670 return icValidateCriticalError;
4675 if (last && last->NumOutputChannels() != m_nOutputChannels) {
4676 sReport += icValidateCriticalErrorMsg;
4677 sReport += sSigName;
4678 ! sReport += " Mis-matching number of output channels!\r\n";
4679 return icValidateCriticalError;
4683 if (last && last->NumOutputChannels() != m_nOutputChannels) {
4684 sReport += icValidateCriticalErrorMsg;
4685 sReport += sSigName;
4686 ! sReport += " Mis-matching number of output channels!\n";
4687 return icValidateCriticalError;
4690 *** misc/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.cpp Mon Aug 20 22:05:00 2007
4691 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.cpp Fri Jan 25 14:23:09 2008
4697 ! sDescription += "ProfileID:\r\n";
4705 ! sDescription += "ProfileID:\n";
4711 sprintf(buf, "%2x", m_profileID.ID8[i]);
4712 sDescription += buf;
4714 ! sDescription += "\r\n";
4716 ! sDescription += "Description:\r\n";
4717 m_desc.Describe(sDescription);
4719 ! sDescription += "\r\n";
4724 sprintf(buf, "%2x", m_profileID.ID8[i]);
4725 sDescription += buf;
4727 ! sDescription += "\n";
4729 ! sDescription += "Description:\n";
4730 m_desc.Describe(sDescription);
4732 ! sDescription += "\n";
4741 ! sprintf(buf, "BEGIN ProfileSequenceIdentification_TAG\r\n");
4742 sDescription += buf;
4743 ! sDescription += "\r\n";
4746 CIccProfileIdDescList::iterator j;
4747 for (i=0, j=m_list->begin(); j!=m_list->end(); i++, j++) {
4748 ! sprintf(buf, "ProfileDescription_%d:\r\n", i+1);
4749 sDescription += buf;
4750 j->Describe(sDescription);
4753 ! sprintf(buf, "END ProfileSequenceIdentification_TAG\r\n");
4754 sDescription += buf;
4755 ! sDescription += "\r\n";
4763 ! sprintf(buf, "BEGIN ProfileSequenceIdentification_TAG\n");
4764 sDescription += buf;
4765 ! sDescription += "\n";
4768 CIccProfileIdDescList::iterator j;
4769 for (i=0, j=m_list->begin(); j!=m_list->end(); i++, j++) {
4770 ! sprintf(buf, "ProfileDescription_%d:\n", i+1);
4771 sDescription += buf;
4772 j->Describe(sDescription);
4775 ! sprintf(buf, "END ProfileSequenceIdentification_TAG\n");
4776 sDescription += buf;
4777 ! sDescription += "\n";
4781 *** misc/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.h Mon Aug 20 22:05:00 2007
4782 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.h Fri Jan 25 14:23:09 2008
4788 ! #endif //_ICCTAGPROFSEQID_H
4793 ! #endif //_ICCTAGPROFSEQID_H
4794 *** misc/SampleICC-1.3.2/IccProfLib/IccUtil.cpp Mon Aug 20 22:05:00 2007
4795 --- misc/build/SampleICC-1.3.2/IccProfLib/IccUtil.cpp Fri Jan 25 14:23:09 2008
4798 #include "IccUtil.h"
4799 #include "IccTagFactory.h"
4801 ! #include <memory.h>
4806 #include "IccUtil.h"
4807 #include "IccTagFactory.h"
4818 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[0]), icFtoD(pMatrix[1]), icFtoD(pMatrix[2]));
4820 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[3]), icFtoD(pMatrix[4]), icFtoD(pMatrix[5]));
4822 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[6]), icFtoD(pMatrix[7]), icFtoD(pMatrix[8]));
4830 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[0]), icFtoD(pMatrix[1]), icFtoD(pMatrix[2]));
4832 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[3]), icFtoD(pMatrix[4]), icFtoD(pMatrix[5]));
4834 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[6]), icFtoD(pMatrix[7]), icFtoD(pMatrix[8]));
4842 sReport += icValidateNonCompliantMsg;
4843 ! sReport += " - XYZNumber: Negative X value!\r\n";
4844 rv = icValidateNonCompliant;
4848 sReport += icValidateNonCompliantMsg;
4849 ! sReport += " - XYZNumber: Negative Y value!\r\n";
4850 rv = icMaxStatus(rv, icValidateNonCompliant);
4854 sReport += icValidateNonCompliantMsg;
4855 ! sReport += " - XYZNumber: Negative Z value!\r\n";
4856 rv = icMaxStatus(rv, icValidateNonCompliant);
4862 sReport += icValidateNonCompliantMsg;
4863 ! sReport += " - XYZNumber: Negative X value!\n";
4864 rv = icValidateNonCompliant;
4868 sReport += icValidateNonCompliantMsg;
4869 ! sReport += " - XYZNumber: Negative Y value!\n";
4870 rv = icMaxStatus(rv, icValidateNonCompliant);
4874 sReport += icValidateNonCompliantMsg;
4875 ! sReport += " - XYZNumber: Negative Z value!\n";
4876 rv = icMaxStatus(rv, icValidateNonCompliant);
4882 if (dateTime.year<1992) {
4883 sReport += icValidateWarningMsg;
4884 ! sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
4886 rv = icValidateWarning;
4890 if (dateTime.year<1992) {
4891 sReport += icValidateWarningMsg;
4892 ! sprintf(buf," - %u: Invalid year!\n",dateTime.year);
4894 rv = icValidateWarning;
4898 if (newtime->tm_mon==11 && newtime->tm_mday==31) {
4899 if (dateTime.year>(year+1)) {
4900 sReport += icValidateWarningMsg;
4901 ! sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
4903 rv = icMaxStatus(rv, icValidateWarning);
4906 if (newtime->tm_mon==11 && newtime->tm_mday==31) {
4907 if (dateTime.year>(year+1)) {
4908 sReport += icValidateWarningMsg;
4909 ! sprintf(buf," - %u: Invalid year!\n",dateTime.year);
4911 rv = icMaxStatus(rv, icValidateWarning);
4916 if (dateTime.year>year) {
4917 sReport += icValidateWarningMsg;
4918 ! sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
4920 rv = icMaxStatus(rv, icValidateWarning);
4924 if (dateTime.year>year) {
4925 sReport += icValidateWarningMsg;
4926 ! sprintf(buf," - %u: Invalid year!\n",dateTime.year);
4928 rv = icMaxStatus(rv, icValidateWarning);
4933 if (dateTime.month<1 || dateTime.month>12) {
4934 sReport += icValidateWarningMsg;
4935 ! sprintf(buf," - %u: Invalid month!\r\n",dateTime.month);
4937 rv = icMaxStatus(rv, icValidateWarning);
4941 if (dateTime.month<1 || dateTime.month>12) {
4942 sReport += icValidateWarningMsg;
4943 ! sprintf(buf," - %u: Invalid month!\n",dateTime.month);
4945 rv = icMaxStatus(rv, icValidateWarning);
4950 if (dateTime.day<1 || dateTime.day>31) {
4951 sReport += icValidateWarningMsg;
4952 ! sprintf(buf," - %u: Invalid day!\r\n",dateTime.day);
4954 rv = icMaxStatus(rv, icValidateWarning);
4958 if (dateTime.day<1 || dateTime.day>31) {
4959 sReport += icValidateWarningMsg;
4960 ! sprintf(buf," - %u: Invalid day!\n",dateTime.day);
4962 rv = icMaxStatus(rv, icValidateWarning);
4966 if (dateTime.month==2) {
4967 if (dateTime.day>29) {
4968 sReport += icValidateWarningMsg;
4969 ! sprintf(buf," - %u: Invalid day for February!\r\n",dateTime.day);
4971 rv = icMaxStatus(rv, icValidateWarning);
4974 if (dateTime.month==2) {
4975 if (dateTime.day>29) {
4976 sReport += icValidateWarningMsg;
4977 ! sprintf(buf," - %u: Invalid day for February!\n",dateTime.day);
4979 rv = icMaxStatus(rv, icValidateWarning);
4983 if (dateTime.day==29) {
4984 if ((dateTime.year%4)!=0) {
4985 sReport += icValidateWarningMsg;
4986 ! sprintf(buf," - %u: Invalid day for February, year is not a leap year(%u)!\r\n",dateTime.day, dateTime.year);
4988 rv = icMaxStatus(rv, icValidateWarning);
4991 if (dateTime.day==29) {
4992 if ((dateTime.year%4)!=0) {
4993 sReport += icValidateWarningMsg;
4994 ! sprintf(buf," - %u: Invalid day for February, year is not a leap year(%u)!\n",dateTime.day, dateTime.year);
4996 rv = icMaxStatus(rv, icValidateWarning);
5001 if (dateTime.hours>23) {
5002 sReport += icValidateWarningMsg;
5003 ! sprintf(buf," - %u: Invalid hour!\r\n",dateTime.hours);
5005 rv = icMaxStatus(rv, icValidateWarning);
5009 if (dateTime.hours>23) {
5010 sReport += icValidateWarningMsg;
5011 ! sprintf(buf," - %u: Invalid hour!\n",dateTime.hours);
5013 rv = icMaxStatus(rv, icValidateWarning);
5018 if (dateTime.minutes>59) {
5019 sReport += icValidateWarningMsg;
5020 ! sprintf(buf," - %u: Invalid minutes!\r\n",dateTime.minutes);
5022 rv = icMaxStatus(rv, icValidateWarning);
5026 if (dateTime.minutes>59) {
5027 sReport += icValidateWarningMsg;
5028 ! sprintf(buf," - %u: Invalid minutes!\n",dateTime.minutes);
5030 rv = icMaxStatus(rv, icValidateWarning);
5035 if (dateTime.seconds>59) {
5036 sReport += icValidateWarningMsg;
5037 ! sprintf(buf," - %u: Invalid seconds!\r\n",dateTime.hours);
5039 rv = icMaxStatus(rv, icValidateWarning);
5043 if (dateTime.seconds>59) {
5044 sReport += icValidateWarningMsg;
5045 ! sprintf(buf," - %u: Invalid seconds!\n",dateTime.hours);
5047 rv = icMaxStatus(rv, icValidateWarning);
5049 *** misc/SampleICC-1.3.2/IccProfLib/icProfileHeader.h Mon Aug 20 22:05:00 2007
5050 --- misc/build/SampleICC-1.3.2/IccProfLib/icProfileHeader.h Fri Jan 25 14:23:09 2008
5054 icFlare0 = 0x00000000, /* 0% flare */
5055 icFlare100 = 0x00000001, /* 100% flare */
5056 } icMeasurementFlare;
5058 /** Convenience Enum Definition - Not defined in ICC specification*/
5059 ! #define icMaxEnumFlare ((icMeasurementFlare) 0xFFFFFFFF)
5060 #define icMaxFlare ((icMeasurementFlare) 0xFFFFFFFF) /* as defined by earlier versions */
5065 icFlare0 = 0x00000000, /* 0% flare */
5066 icFlare100 = 0x00000001, /* 100% flare */
5067 + icMaxEnumFlare = 0xFFFFFFFF
5068 } icMeasurementFlare;
5070 /** Convenience Enum Definition - Not defined in ICC specification*/
5071 ! /*#define icMaxEnumFlare ((icMeasurementFlare) 0xFFFFFFFF)*/
5072 #define icMaxFlare ((icMeasurementFlare) 0xFFFFFFFF) /* as defined by earlier versions */
5075 *** misc/SampleICC-1.3.2/Tools/CmdLine/Makefile.in Mon Aug 20 22:10:42 2007
5076 --- misc/build/SampleICC-1.3.2/Tools/CmdLine/Makefile.in Fri Jan 25 14:23:09 2008
5079 am__quote = @am__quote@
5080 install_sh = @install_sh@
5082 ! SUBDIRS = IccApplyNamedCmm \
5083 ! @SICC_ICC_APPLY_PROFILES@ \
5086 IccStripUnknownTags \
5090 ! DIST_SUBDIRS = IccApplyNamedCmm \
5091 ! IccApplyProfiles \
5094 IccStripUnknownTags \
5097 am__quote = @am__quote@
5098 install_sh = @install_sh@
5100 ! SUBDIRS = IccDumpProfile \
5102 IccStripUnknownTags \
5106 ! DIST_SUBDIRS = IccDumpProfile \
5108 IccStripUnknownTags \
5110 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp 2007-08-20 22:04:53.000000000 +0200
5111 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp 2008-01-31 13:53:16.000000000 +0100
5116 //////////////////////////////////////////////////////////////////////
5118 + #include <stdlib.h>
5119 + #include <string.h>
5123 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h 2007-08-20 22:04:54.000000000 +0200
5124 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h 2008-01-31 13:54:51.000000000 +0100
5128 #ifndef __DEFINED_ICC_TOOL_EXCEPTION_H__
5129 #define __DEFINED_ICC_TOOL_EXCEPTION_H__
5131 + #include <string.h>
5132 #include <exception>
5135 *** misc/SampleICC-1.3.2/IccProfLib/IccCmm.cpp 2007-08-20 22:05:00.000000000 +0200
5136 --- misc/build/SampleICC-1.3.2/IccProfLib/IccCmm.cpp 2008-01-31 13:49:54.000000000 +0100
5140 #pragma warning( disable: 4786) //disable warning in <list.h>
5143 + #include <stdlib.h>
5144 + #include <string.h>
5148 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h 2007-08-20 22:04:53.000000000 +0200
5149 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h 2008-01-31 14:05:58.000000000 +0100
5154 #include <sys/types.h>
5155 #include <sys/stat.h>
5156 + #include <stdlib.h>
5159 typedef unsigned short mode_t;
5160 --- misc/SampleICC-1.3.2/IccProfLib/md5.cpp
5161 +++ misc/build/SampleICC-1.3.2/IccProfLib/md5.cpp
5166 +#include <string.h>
5168 static void MD5Transform (UINT4 [4], unsigned char [64]);
5169 static void Encode (unsigned char *, UINT4 *, unsigned int);