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;
581 ! #include <sys/errno.h>
584 ! #include <string.h>
588 ! #if defined WIN32 || defined sun
589 ! int strerror_r(int errnum, char *str, int strsize)
591 ! const char *errstr = strerror(errnum);
594 ! strncpy(str, errstr, strsize);
602 ! #include "ICC_tool_exception.h"
605 ! path_tail(const char* const s)
607 ! const char* tail = strdup(s);
608 ! const char* last_slash = strrchr(tail, '/');
609 ! if (last_slash != NULL)
610 ! tail = last_slash + 1;
615 ! vet_as_int(const char* const s, const string& name,
616 ! const string& description)
618 ! istringstream ss(s);
624 ! oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
625 ! << " an integer. It should be an integer representing "
626 ! << description << ".";
627 ! throw ICC_tool_exception(oss.str());
632 ! vet_as_float(const char* const s, const string& name,
633 ! const string& description)
635 ! istringstream ss(s);
641 ! oss << "The " << name << " argument given, `" << s << "', cannot be parsed as"
642 ! << " a floating-point number. It should be a floating-point number"
643 ! << " representing " << description << ".";
644 ! throw ICC_tool_exception(oss.str());
648 ! #define STRERROR_BUF_SIZE 256
650 ! get_size(const char* const s)
653 ! int stat_returned = stat(s, &sb);
654 ! if (stat_returned < 0)
656 ! int stat_errno = errno;
657 ! char strerror_buf[STRERROR_BUF_SIZE];
658 ! strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
660 ! oss << "Could not access information for file `" << s << "': "
662 ! throw ICC_tool_exception(oss.str());
668 ! check_mode(const char* const s, mode_t mode)
671 ! int stat_returned = stat(s, &sb);
672 ! if (stat_returned < 0)
674 ! int stat_errno = errno;
675 ! char strerror_buf[STRERROR_BUF_SIZE];
676 ! strerror_r(stat_errno, strerror_buf, STRERROR_BUF_SIZE);
678 ! oss << "Could not access information for file `" << s << "': "
680 ! throw ICC_tool_exception(oss.str());
682 ! return (sb.st_mode & mode) != 0;
686 ! is_existent_file_pathname(const char* const s)
689 ! return stat(s, &sb) == 0;
693 ! is_plain_file_pathname(const char* const s)
695 ! return check_mode(s, S_IFREG);
699 ! is_directory(const char* const s)
701 ! return check_mode(s, S_IFDIR);
705 ! containing_directory(const char* const s)
707 ! if (strlen(s) == 0)
708 ! throw ICC_tool_exception("name of directory passed to containing_directory"
709 ! " function was zero-length.");
710 ! char* tmp = strdup(s);
711 ! // lop off any trailing seperator
712 ! if (tmp[strlen(tmp) - 1] == '/')
713 ! tmp[strlen(tmp) - 1] = 0;
714 ! if (strlen(tmp) == 0)
715 ! throw ICC_tool_exception("root directory (which has no containing"
716 ! " directory) passed to containing_directory"
718 ! char* idx = strrchr(tmp, '/');
724 ! char* current_directory = getenv("PWD");
725 ! if (current_directory == NULL)
726 ! throw ICC_tool_exception("pathname passed to containing_directory has no"
727 ! " embedded seperator, and there is no value for"
728 ! " PWD defined in the environment");
729 ! return strdup(current_directory);
733 ! is_readable_pathname(const char* const s)
735 ! return check_mode(s, S_IRUSR)
736 ! || check_mode(s, S_IRGRP)
737 ! || check_mode(s, S_IROTH);
741 ! is_writable_pathname(const char* const s)
743 ! return check_mode(s, S_IWUSR)
744 ! || check_mode(s, S_IWGRP)
745 ! || check_mode(s, S_IWOTH);
749 ! is_pathname_of_empty_file(const char* const s)
751 ! return get_size(s) > 0;
755 ! vet_input_file_pathname(const char* const s, const string& name,
756 ! const string& description)
758 ! if (! is_plain_file_pathname(s))
761 ! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
762 ! << " of a plain file (i.e. it is the pathname of a directory, or of a"
763 ! << " symbolic link, or of some other sort of special file.) It should be"
764 ! << " " << description << ".";
765 ! throw ICC_tool_exception(oss.str());
767 ! if (! is_readable_pathname(s))
770 ! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
771 ! << " of a readable file (i.e. you do not have permission to read that"
772 ! << " file, or you do not have permission to read some directory"
773 ! << " containing that file.";
774 ! throw ICC_tool_exception(oss.str());
776 ! if (! is_pathname_of_empty_file(s))
779 ! oss << "The " << name << " argument given, `" << s << "', is not the pathname"
780 ! << " of an existing readable file, but that file is of zero length."
781 ! << " The argument should be " << description << ".";
782 ! throw ICC_tool_exception(oss.str());
787 ! vet_output_file_pathname(const char* const s, const string& name,
788 ! const string& description,
789 ! bool silent_overwrite_OK)
791 ! const char* const container = containing_directory(s);
792 ! if (! is_writable_pathname(container))
795 ! oss << "The " << name << " argument given, `" << s << "', has a directory"
796 ! << " component which is not writable."
797 ! << " The argument should be " << description << ".";
798 ! throw ICC_tool_exception(oss.str());
800 ! if (is_existent_file_pathname(s))
802 ! if (is_plain_file_pathname(s))
803 ! if (is_writable_pathname(s))
805 ! if (! silent_overwrite_OK)
808 ! oss << "The " << name << " argument given, `" << s << "' is of an existing"
810 ! << " The argument should be " << description << ".";
811 ! throw ICC_tool_exception(oss.str());
815 ! oss << "The " << name << " argument given, `" << s << "' is of an existing"
816 ! << " file which is not writable."
817 ! << " The argument should be " << description << ".";
818 ! throw ICC_tool_exception(oss.str());
822 *** misc/SampleICC-1.3.2/IccProfLib/IccIO.cpp Mon Aug 20 22:05:00 2007
823 --- misc/build/SampleICC-1.3.2/IccProfLib/IccIO.cpp Fri Jan 25 14:23:09 2008
829 ! #include <memory.h>
841 *** misc/SampleICC-1.3.2/IccProfLib/IccIO.h Mon Aug 20 22:05:00 2007
842 --- misc/build/SampleICC-1.3.2/IccProfLib/IccIO.h Fri Jan 25 14:23:09 2008
852 #ifdef USESAMPLEICCNAMESPACE
853 *** misc/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp Mon Aug 20 22:05:00 2007
854 --- misc/build/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp Fri Jan 25 14:23:09 2008
860 ! sDescription += "ELEM_bACS\r\n";
862 ! sDescription += "ELEM_eACS\r\n";
864 icGetSig(sigBuf, m_signature);
865 sDescription += " Signature = ";
866 sDescription += sigBuf;
867 ! sDescription += "\r\n";
870 ! sDescription += "\r\nData Follows:\r\n";
872 icMemDump(sDescription, m_pData, m_nDataSize);
878 ! sDescription += "ELEM_bACS\n";
880 ! sDescription += "ELEM_eACS\n";
882 icGetSig(sigBuf, m_signature);
883 sDescription += " Signature = ";
884 sDescription += sigBuf;
885 ! sDescription += "\n";
888 ! sDescription += "\nData Follows:\n";
890 icMemDump(sDescription, m_pData, m_nDataSize);
892 *** misc/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp Mon Aug 20 22:05:00 2007
893 --- misc/build/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp Fri Jan 25 14:23:09 2008
896 sprintf(buf, "%.8f", m_endPoint);
899 ! sprintf(buf, "]\r\nFunctionType: %04Xh\r\n", m_nFunctionType);
902 switch(m_nFunctionType) {
904 if (m_params[1]==0.0 && m_params[2]==0.0)
905 ! sprintf(buf, "Y = %.8f\r\n\r\n", m_params[3]);
906 else if (m_params[0]==1.0 && m_params[1]==1.0 && m_params[2]==0.0 && m_params[3]==0.0)
907 ! sprintf(buf, "Y = X\r\n\r\n");
908 else if (m_params[0]==1.0 && m_params[2]==0.0)
909 ! sprintf(buf, "Y = %.8f * X + %.8f\r\n\r\n",
910 m_params[1], m_params[3]);
912 ! sprintf(buf, "Y = (%.8f * X + %.8f)^%.4f + %.8f\r\n\r\n",
913 m_params[1], m_params[2], m_params[0], m_params[3]);
918 ! sprintf(buf, "Y = %.8f * log (%.8f * (X ^ %.8f) + %.8f) + %.8f\r\n\r\n",
919 m_params[1], m_params[2], m_params[0], m_params[3], m_params[4]);
924 ! sprintf(buf, "Y = %.8f * (%.8f ^ (%.8f * X + %.8f)) + %.8f\r\n\r\n",
925 m_params[0], m_params[1], m_params[2], m_params[3], m_params[4]);
929 sprintf(buf, "%.8f", m_endPoint);
932 ! sprintf(buf, "]\nFunctionType: %04Xh\n", m_nFunctionType);
935 switch(m_nFunctionType) {
937 if (m_params[1]==0.0 && m_params[2]==0.0)
938 ! sprintf(buf, "Y = %.8f\n\n", m_params[3]);
939 else if (m_params[0]==1.0 && m_params[1]==1.0 && m_params[2]==0.0 && m_params[3]==0.0)
940 ! sprintf(buf, "Y = X\n\n");
941 else if (m_params[0]==1.0 && m_params[2]==0.0)
942 ! sprintf(buf, "Y = %.8f * X + %.8f\n\n",
943 m_params[1], m_params[3]);
945 ! sprintf(buf, "Y = (%.8f * X + %.8f)^%.4f + %.8f\n\n",
946 m_params[1], m_params[2], m_params[0], m_params[3]);
951 ! sprintf(buf, "Y = %.8f * log (%.8f * (X ^ %.8f) + %.8f) + %.8f\n\n",
952 m_params[1], m_params[2], m_params[0], m_params[3], m_params[4]);
957 ! sprintf(buf, "Y = %.8f * (%.8f ^ (%.8f * X + %.8f)) + %.8f\n\n",
958 m_params[0], m_params[1], m_params[2], m_params[3], m_params[4]);
966 ! sprintf(buf, "Unknown Function with %d parameters:\r\n\r\n", m_nParameters);
969 for (i=0; i<m_nParameters; i++) {
970 ! sprintf(buf, "Param[%d] = %.8lf\r\n\r\n", i, m_params[i]);
978 ! sprintf(buf, "Unknown Function with %d parameters:\n\n", m_nParameters);
981 for (i=0; i<m_nParameters; i++) {
982 ! sprintf(buf, "Param[%d] = %.8lf\n\n", i, m_params[i]);
988 if (m_nReserved || m_nReserved2) {
989 sReport += icValidateWarningMsg;
991 ! sReport += " formula curve has non zero reserved data.\r\n";
992 rv = icValidateWarning;
996 if (m_nReserved || m_nReserved2) {
997 sReport += icValidateWarningMsg;
999 ! sReport += " formula curve has non zero reserved data.\n";
1000 rv = icValidateWarning;
1005 if (!m_params || m_nParameters<4) {
1006 sReport += icValidateCriticalErrorMsg;
1007 sReport += sSigName;
1008 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
1009 rv = icValidateCriticalError;
1011 else if (m_nParameters > 4) {
1012 sReport += icValidateWarningMsg;
1013 sReport += sSigName;
1014 ! sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
1015 rv = icValidateWarning;
1019 if (!m_params || m_nParameters<4) {
1020 sReport += icValidateCriticalErrorMsg;
1021 sReport += sSigName;
1022 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
1023 rv = icValidateCriticalError;
1025 else if (m_nParameters > 4) {
1026 sReport += icValidateWarningMsg;
1027 sReport += sSigName;
1028 ! sReport += " formula curve has too many formulaCurveSegment parameters.\n";
1029 rv = icValidateWarning;
1034 if (!m_params || m_nParameters<5) {
1035 sReport += icValidateCriticalErrorMsg;
1036 sReport += sSigName;
1037 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
1038 rv = icValidateCriticalError;
1040 else if (m_nParameters > 5) {
1041 sReport += icValidateWarningMsg;
1042 sReport += sSigName;
1043 ! sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
1044 rv = icValidateWarning;
1048 if (!m_params || m_nParameters<5) {
1049 sReport += icValidateCriticalErrorMsg;
1050 sReport += sSigName;
1051 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
1052 rv = icValidateCriticalError;
1054 else if (m_nParameters > 5) {
1055 sReport += icValidateWarningMsg;
1056 sReport += sSigName;
1057 ! sReport += " formula curve has too many formulaCurveSegment parameters.\n";
1058 rv = icValidateWarning;
1063 if (!m_params || m_nParameters<5) {
1064 sReport += icValidateCriticalErrorMsg;
1065 sReport += sSigName;
1066 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
1067 rv = icValidateCriticalError;
1069 else if (m_nParameters > 5) {
1070 sReport += icValidateWarningMsg;
1071 sReport += sSigName;
1072 ! sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
1073 rv = icValidateWarning;
1077 if (!m_params || m_nParameters<5) {
1078 sReport += icValidateCriticalErrorMsg;
1079 sReport += sSigName;
1080 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
1081 rv = icValidateCriticalError;
1083 else if (m_nParameters > 5) {
1084 sReport += icValidateWarningMsg;
1085 sReport += sSigName;
1086 ! sReport += " formula curve has too many formulaCurveSegment parameters.\n";
1087 rv = icValidateWarning;
1093 sReport += icValidateCriticalErrorMsg;
1094 sReport += sSigName;
1095 ! sprintf(buf, " formula curve uses unknown formulaCurveSegment function type %d\r\n", m_nFunctionType);
1097 rv = icValidateCriticalError;
1101 sReport += icValidateCriticalErrorMsg;
1102 sReport += sSigName;
1103 ! sprintf(buf, " formula curve uses unknown formulaCurveSegment function type %d\n", m_nFunctionType);
1105 rv = icValidateCriticalError;
1109 sDescription += buf;
1112 ! sprintf(buf, "]\r\n");
1113 sDescription += buf;
1117 sDescription += buf;
1120 ! sprintf(buf, "]\n");
1121 sDescription += buf;
1126 sprintf(buf, "%.8f", m_endPoint);
1127 sDescription += buf;
1129 ! sprintf(buf, "]\r\n");
1130 sDescription += buf;
1131 ! sDescription += "IN OUT\r\n";
1136 sprintf(buf, "%.8f", m_endPoint);
1137 sDescription += buf;
1139 ! sprintf(buf, "]\n");
1140 sDescription += buf;
1141 ! sDescription += "IN OUT\n";
1147 icFloatNumber last = (icFloatNumber)(m_nCount-1);
1149 for (i=0; i<m_nCount; i++) {
1150 ! sprintf(buf, "%.8f %.8f\r\n", m_startPoint + (icFloatNumber)i*range/last, m_pSamples[i]);
1151 sDescription += buf;
1154 ! sDescription += "\r\n";
1159 icFloatNumber last = (icFloatNumber)(m_nCount-1);
1161 for (i=0; i<m_nCount; i++) {
1162 ! sprintf(buf, "%.8f %.8f\n", m_startPoint + (icFloatNumber)i*range/last, m_pSamples[i]);
1163 sDescription += buf;
1166 ! sDescription += "\n";
1173 sReport += icValidateWarningMsg;
1174 sReport += sSigName;
1175 ! sReport += " sampled curve has non zero reserved data.\r\n";
1176 rv = icValidateWarning;
1181 sReport += icValidateWarningMsg;
1182 sReport += sSigName;
1183 ! sReport += " sampled curve has non zero reserved data.\n";
1184 rv = icValidateWarning;
1190 sReport += icValidateCriticalErrorMsg;
1191 sReport += sSigName;
1192 ! sReport += " sampled curve has too few sample points.\r\n";
1193 rv = icValidateCriticalError;
1195 else if (m_endPoint-m_startPoint == 0.0) {
1196 sReport += icValidateWarningMsg;
1197 sReport += sSigName;
1198 ! sReport += " sampled curve has a range of zero.\r\n";
1199 rv = icMaxStatus(rv, icValidateWarning);
1204 sReport += icValidateCriticalErrorMsg;
1205 sReport += sSigName;
1206 ! sReport += " sampled curve has too few sample points.\n";
1207 rv = icValidateCriticalError;
1209 else if (m_endPoint-m_startPoint == 0.0) {
1210 sReport += icValidateWarningMsg;
1211 sReport += sSigName;
1212 ! sReport += " sampled curve has a range of zero.\n";
1213 rv = icMaxStatus(rv, icValidateWarning);
1219 CIccCurveSegmentList::iterator i;
1221 ! sDescription += "BEGIN_CURVE\r\n";
1222 for (i=m_list->begin(); i!=m_list->end(); i++) {
1223 (*i)->Describe(sDescription);
1227 CIccCurveSegmentList::iterator i;
1229 ! sDescription += "BEGIN_CURVE\n";
1230 for (i=m_list->begin(); i!=m_list->end(); i++) {
1231 (*i)->Describe(sDescription);
1235 if (m_nReserved1 || m_nReserved2) {
1236 sReport += icValidateWarningMsg;
1237 sReport += sSigName;
1238 ! sReport += " Segmented curve has non zero reserved data.\r\n";
1239 rv = icValidateWarning;
1243 if (m_nReserved1 || m_nReserved2) {
1244 sReport += icValidateWarningMsg;
1245 sReport += sSigName;
1246 ! sReport += " Segmented curve has non zero reserved data.\n";
1247 rv = icValidateWarning;
1252 if (m_list->size()==0) {
1253 sReport += icValidateCriticalErrorMsg;
1254 sReport += sSigName;
1255 ! sReport += " Has Empty CurveSegment!\r\n";
1256 return icValidateCriticalError;
1260 if (m_list->size()==0) {
1261 sReport += icValidateCriticalErrorMsg;
1262 sReport += sSigName;
1263 ! sReport += " Has Empty CurveSegment!\n";
1264 return icValidateCriticalError;
1272 ! sprintf(buf, "BEGIN_CURVE_SET %d\r\n", m_nInputChannels);
1273 sDescription += buf;
1275 for (i=0; i<m_nInputChannels; i++) {
1276 ! sprintf(buf, "Curve %d of %d\r\n", i+1, m_nInputChannels);
1277 sDescription += buf;
1279 m_curve[i]->Describe(sDescription);
1284 ! sprintf(buf, "BEGIN_CURVE_SET %d\n", m_nInputChannels);
1285 sDescription += buf;
1287 for (i=0; i<m_nInputChannels; i++) {
1288 ! sprintf(buf, "Curve %d of %d\n", i+1, m_nInputChannels);
1289 sDescription += buf;
1291 m_curve[i]->Describe(sDescription);
1294 sReport += " - Element ";
1295 sSigName = Info.GetSigName(GetType());
1296 sReport += sSigName;
1297 ! sReport += " Has Empty Curve Element(s)!\r\n";
1298 return icValidateCriticalError;
1302 sReport += " - Element ";
1303 sSigName = Info.GetSigName(GetType());
1304 sReport += sSigName;
1305 ! sReport += " Has Empty Curve Element(s)!\n";
1306 return icValidateCriticalError;
1312 icFloatNumber *data = m_pMatrix;
1314 ! sprintf(buf, "BEGIN_ELEM_MATRIX %d %d\r\n", m_nInputChannels, m_nOutputChannels);
1315 sDescription += buf;
1317 for (j=0; j<m_nOutputChannels; j++) {
1320 icFloatNumber *data = m_pMatrix;
1322 ! sprintf(buf, "BEGIN_ELEM_MATRIX %d %d\n", m_nInputChannels, m_nOutputChannels);
1323 sDescription += buf;
1325 for (j=0; j<m_nOutputChannels; j++) {
1328 sprintf(buf, "%12.8lf", data[i]);
1329 sDescription += buf;
1331 ! sprintf(buf, " + %12.8lf\r\n", m_pConstants[j]);
1332 sDescription += buf;
1336 sprintf(buf, "%12.8lf", data[i]);
1337 sDescription += buf;
1339 ! sprintf(buf, " + %12.8lf\n", m_pConstants[j]);
1340 sDescription += buf;
1345 sReport += " - Element ";
1346 sSigName = Info.GetSigName(GetType());
1347 sReport += sSigName;
1348 ! sReport += " Has Empty Matrix data!\r\n";
1349 return icValidateCriticalError;
1353 sReport += " - Element ";
1354 sSigName = Info.GetSigName(GetType());
1355 sReport += sSigName;
1356 ! sReport += " Has Empty Matrix data!\n";
1357 return icValidateCriticalError;
1362 sReport += " - Element ";
1363 sSigName = Info.GetSigName(GetType());
1364 sReport += sSigName;
1365 ! sReport += " Has No CLUT!\r\n";
1366 return icValidateCriticalError;
1370 sReport += " - Element ";
1371 sSigName = Info.GetSigName(GetType());
1372 sReport += sSigName;
1373 ! sReport += " Has No CLUT!\n";
1374 return icValidateCriticalError;
1377 *** misc/SampleICC-1.3.2/IccProfLib/IccProfLibConf.h Mon Aug 20 22:05:00 2007
1378 --- misc/build/SampleICC-1.3.2/IccProfLib/IccProfLibConf.h Fri Jan 25 14:23:09 2008
1381 #define ICUINT64TYPE unsigned long long
1382 #define ICINT64TYPE long long
1384 ! #if defined(__APPLE__)
1385 ! #if defined(__LITTLE_ENDIAN__)
1386 ! #define ICC_BYTE_ORDER_LITTLE_ENDIAN
1388 #define ICC_BYTE_ORDER_BIG_ENDIAN
1391 ! #define ICC_BYTE_ORDER_LITTLE_ENDIAN
1394 #define ICCPROFLIB_API
1395 #define ICCPROFLIB_EXTERN
1397 #define ICUINT64TYPE unsigned long long
1398 #define ICINT64TYPE long long
1400 ! /* #if defined(__APPLE__) */
1401 ! /* #if defined(__LITTLE_ENDIAN__) */
1402 ! /* #define ICC_BYTE_ORDER_LITTLE_ENDIAN */
1404 #define ICC_BYTE_ORDER_BIG_ENDIAN
1407 ! /* #define ICC_BYTE_ORDER_LITTLE_ENDIAN */
1410 #define ICCPROFLIB_API
1411 #define ICCPROFLIB_EXTERN
1412 *** misc/SampleICC-1.3.2/IccProfLib/IccProfile.cpp Mon Aug 20 22:05:00 2007
1413 --- misc/build/SampleICC-1.3.2/IccProfLib/IccProfile.cpp Fri Jan 25 14:23:09 2008
1417 if (!ReadBasic(pIO)) {
1418 sReport += icValidateCriticalErrorMsg;
1419 ! sReport += " - Unable to read profile!**\r\n\tProfile has invalid structure!\r\n";
1422 return icValidateCriticalError;
1425 if (!ReadBasic(pIO)) {
1426 sReport += icValidateCriticalErrorMsg;
1427 ! sReport += " - Unable to read profile!**\n\tProfile has invalid structure!\n";
1430 return icValidateCriticalError;
1433 // Check profile header
1434 if (!CheckFileSize(pIO)) {
1435 sReport += icValidateNonCompliantMsg;
1436 ! sReport += "Bad Header File Size\r\n";
1437 rv = icMaxStatus(rv, icValidateNonCompliant);
1441 // Check profile header
1442 if (!CheckFileSize(pIO)) {
1443 sReport += icValidateNonCompliantMsg;
1444 ! sReport += "Bad Header File Size\n";
1445 rv = icMaxStatus(rv, icValidateNonCompliant);
1450 CalcProfileID(pIO, &profileID);
1451 if (strncmp((char*)profileID.ID8, (char*)m_Header.profileID.ID8, 16) != 0) {
1452 sReport += icValidateNonCompliantMsg;
1453 ! sReport += "Bad Profile ID\r\n";
1455 rv = icMaxStatus(rv, icValidateNonCompliant);
1458 CalcProfileID(pIO, &profileID);
1459 if (strncmp((char*)profileID.ID8, (char*)m_Header.profileID.ID8, 16) != 0) {
1460 sReport += icValidateNonCompliantMsg;
1461 ! sReport += "Bad Profile ID\n";
1463 rv = icMaxStatus(rv, icValidateNonCompliant);
1467 sReport += icValidateCriticalErrorMsg;
1469 sReport += Info.GetTagSigName(i->TagInfo.sig);
1470 ! sReport += " - Tag has invalid structure!\r\n";
1472 rv = icMaxStatus(rv, icValidateCriticalError);
1475 sReport += icValidateCriticalErrorMsg;
1477 sReport += Info.GetTagSigName(i->TagInfo.sig);
1478 ! sReport += " - Tag has invalid structure!\n";
1480 rv = icMaxStatus(rv, icValidateCriticalError);
1486 sReport += icValidateCriticalErrorMsg;
1487 ! sprintf(buf, " - %s: Unknown profile class!\r\n", Info.GetProfileClassSigName(m_Header.deviceClass));
1489 rv = icMaxStatus(rv, icValidateCriticalError);
1494 sReport += icValidateCriticalErrorMsg;
1495 ! sprintf(buf, " - %s: Unknown profile class!\n", Info.GetProfileClassSigName(m_Header.deviceClass));
1497 rv = icMaxStatus(rv, icValidateCriticalError);
1502 if (!Info.IsValidSpace(m_Header.colorSpace)) {
1503 sReport += icValidateCriticalErrorMsg;
1504 ! sprintf(buf, " - %s: Unknown color space!\r\n", Info.GetColorSpaceSigName(m_Header.colorSpace));
1506 rv = icMaxStatus(rv, icValidateCriticalError);
1510 if (!Info.IsValidSpace(m_Header.colorSpace)) {
1511 sReport += icValidateCriticalErrorMsg;
1512 ! sprintf(buf, " - %s: Unknown color space!\n", Info.GetColorSpaceSigName(m_Header.colorSpace));
1514 rv = icMaxStatus(rv, icValidateCriticalError);
1518 if (m_Header.deviceClass==icSigLinkClass) {
1519 if (!Info.IsValidSpace(m_Header.pcs)) {
1520 sReport += icValidateCriticalErrorMsg;
1521 ! sprintf(buf, " - %s: Unknown pcs color space!\r\n", Info.GetColorSpaceSigName(m_Header.pcs));
1523 rv = icMaxStatus(rv, icValidateCriticalError);
1526 if (m_Header.deviceClass==icSigLinkClass) {
1527 if (!Info.IsValidSpace(m_Header.pcs)) {
1528 sReport += icValidateCriticalErrorMsg;
1529 ! sprintf(buf, " - %s: Unknown pcs color space!\n", Info.GetColorSpaceSigName(m_Header.pcs));
1531 rv = icMaxStatus(rv, icValidateCriticalError);
1536 if (m_Header.pcs!=icSigXYZData && m_Header.pcs!=icSigLabData) {
1537 sReport += icValidateCriticalErrorMsg;
1538 ! sprintf(buf, " - %s: Invalid pcs color space!\r\n", Info.GetColorSpaceSigName(m_Header.pcs));
1540 rv = icMaxStatus(rv, icValidateCriticalError);
1544 if (m_Header.pcs!=icSigXYZData && m_Header.pcs!=icSigLabData) {
1545 sReport += icValidateCriticalErrorMsg;
1546 ! sprintf(buf, " - %s: Invalid pcs color space!\n", Info.GetColorSpaceSigName(m_Header.pcs));
1548 rv = icMaxStatus(rv, icValidateCriticalError);
1554 sReport += icValidateWarningMsg;
1555 ! sprintf(buf, " - %s: Unknown platform signature.\r\n", Info.GetPlatformSigName(m_Header.platform));
1557 rv = icMaxStatus(rv, icValidateWarning);
1562 sReport += icValidateWarningMsg;
1563 ! sprintf(buf, " - %s: Unknown platform signature.\n", Info.GetPlatformSigName(m_Header.platform));
1565 rv = icMaxStatus(rv, icValidateWarning);
1571 sReport += icValidateWarningMsg;
1572 ! sprintf(buf, " - %s: Unregisterd CMM signature.\r\n", Info.GetCmmSigName((icCmmSignature)m_Header.cmmId));
1574 rv = icMaxStatus(rv, icValidateWarning);
1579 sReport += icValidateWarningMsg;
1580 ! sprintf(buf, " - %s: Unregisterd CMM signature.\n", Info.GetCmmSigName((icCmmSignature)m_Header.cmmId));
1582 rv = icMaxStatus(rv, icValidateWarning);
1588 sReport += icValidateCriticalErrorMsg;
1589 ! sprintf(buf, " - %s: Unknown rendering intent!\r\n", Info.GetRenderingIntentName((icRenderingIntent)m_Header.renderingIntent));
1591 rv = icMaxStatus(rv, icValidateCriticalError);
1596 sReport += icValidateCriticalErrorMsg;
1597 ! sprintf(buf, " - %s: Unknown rendering intent!\n", Info.GetRenderingIntentName((icRenderingIntent)m_Header.renderingIntent));
1599 rv = icMaxStatus(rv, icValidateCriticalError);
1603 icFloatNumber Z = icFtoD(m_Header.illuminant.Z);
1604 if (X<0.9640 || X>0.9644 || Y!=1.0 || Z<0.8247 || Z>0.8251) {
1605 sReport += icValidateNonCompliantMsg;
1606 ! sReport += " - Non D50 Illuminant XYZ values.\r\n";
1607 rv = icMaxStatus(rv, icValidateNonCompliant);
1611 icFloatNumber Z = icFtoD(m_Header.illuminant.Z);
1612 if (X<0.9640 || X>0.9644 || Y!=1.0 || Z<0.8247 || Z>0.8251) {
1613 sReport += icValidateNonCompliantMsg;
1614 ! sReport += " - Non D50 Illuminant XYZ values.\n";
1615 rv = icMaxStatus(rv, icValidateNonCompliant);
1622 sReport += icValidateNonCompliantMsg;
1623 ! sReport += " - Reserved value must be zero.\r\n";
1624 rv = icMaxStatus(rv, icValidateNonCompliant);
1630 sReport += icValidateNonCompliantMsg;
1631 ! sReport += " - Reserved value must be zero.\n";
1632 rv = icMaxStatus(rv, icValidateNonCompliant);
1638 sReport += icValidateWarningMsg;
1640 ! sReport += " - Tag exclusion test failed.\r\n";
1646 sReport += icValidateWarningMsg;
1648 ! sReport += " - Tag exclusion test failed.\n";
1655 sReport += icValidateWarningMsg;
1657 ! sReport += " - Tag exclusion test failed.\r\n";
1663 sReport += icValidateWarningMsg;
1665 ! sReport += " - Tag exclusion test failed.\n";
1672 sReport += icValidateWarningMsg;
1674 ! sReport += " - Tag exclusion test failed.\r\n";
1680 sReport += icValidateWarningMsg;
1682 ! sReport += " - Tag exclusion test failed.\n";
1688 if (!IsTypeValid(tagsig, typesig)) {
1689 sReport += icValidateNonCompliantMsg;
1691 ! sprintf(buf," - %s: Invalid tag type (Might be critical!).\r\n", Info.GetTagTypeSigName(typesig));
1693 rv = icMaxStatus(rv, icValidateNonCompliant);
1696 if (!IsTypeValid(tagsig, typesig)) {
1697 sReport += icValidateNonCompliantMsg;
1699 ! sprintf(buf," - %s: Invalid tag type (Might be critical!).\n", Info.GetTagTypeSigName(typesig));
1701 rv = icMaxStatus(rv, icValidateNonCompliant);
1706 if (m_Tags->size() <= 0) {
1707 sReport += icValidateCriticalErrorMsg;
1708 ! sReport += "No tags present.\r\n";
1709 return icValidateCriticalError;
1714 if (m_Tags->size() <= 0) {
1715 sReport += icValidateCriticalErrorMsg;
1716 ! sReport += "No tags present.\n";
1717 return icValidateCriticalError;
1722 if (!GetTag(icSigProfileDescriptionTag) ||
1723 !GetTag(icSigCopyrightTag)) {
1724 sReport += icValidateNonCompliantMsg;
1725 ! sReport += "Required tags missing.\r\n";
1726 rv = icMaxStatus(rv, icValidateNonCompliant);
1730 if (!GetTag(icSigProfileDescriptionTag) ||
1731 !GetTag(icSigCopyrightTag)) {
1732 sReport += icValidateNonCompliantMsg;
1733 ! sReport += "Required tags missing.\n";
1734 rv = icMaxStatus(rv, icValidateNonCompliant);
1739 if (sig != icSigLinkClass) {
1740 if (!GetTag(icSigMediaWhitePointTag)) {
1741 sReport += icValidateCriticalErrorMsg;
1742 ! sReport += "Media white point tag missing.\r\n";
1743 rv = icMaxStatus(rv, icValidateCriticalError);
1747 if (sig != icSigLinkClass) {
1748 if (!GetTag(icSigMediaWhitePointTag)) {
1749 sReport += icValidateCriticalErrorMsg;
1750 ! sReport += "Media white point tag missing.\n";
1751 rv = icMaxStatus(rv, icValidateCriticalError);
1756 if (m_Header.colorSpace == icSigGrayData) {
1757 if (!GetTag(icSigGrayTRCTag)) {
1758 sReport += icValidateCriticalErrorMsg;
1759 ! sReport += "Gray TRC tag missing.\r\n";
1760 rv = icMaxStatus(rv, icValidateCriticalError);
1764 if (m_Header.colorSpace == icSigGrayData) {
1765 if (!GetTag(icSigGrayTRCTag)) {
1766 sReport += icValidateCriticalErrorMsg;
1767 ! sReport += "Gray TRC tag missing.\n";
1768 rv = icMaxStatus(rv, icValidateCriticalError);
1773 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1774 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1775 sReport += icValidateCriticalErrorMsg;
1776 ! sReport += "Critical tag(s) missing.\r\n";
1777 rv = icMaxStatus(rv, icValidateCriticalError);
1781 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1782 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1783 sReport += icValidateCriticalErrorMsg;
1784 ! sReport += "Critical tag(s) missing.\n";
1785 rv = icMaxStatus(rv, icValidateCriticalError);
1790 if (m_Header.colorSpace == icSigGrayData) {
1791 if (!GetTag(icSigGrayTRCTag)) {
1792 sReport += icValidateCriticalErrorMsg;
1793 ! sReport += "Gray TRC tag missing.\r\n";
1794 rv = icMaxStatus(rv, icValidateCriticalError);
1798 if (m_Header.colorSpace == icSigGrayData) {
1799 if (!GetTag(icSigGrayTRCTag)) {
1800 sReport += icValidateCriticalErrorMsg;
1801 ! sReport += "Gray TRC tag missing.\n";
1802 rv = icMaxStatus(rv, icValidateCriticalError);
1807 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1808 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1809 sReport += icValidateCriticalErrorMsg;
1810 ! sReport += "Critical tag(s) missing.\r\n";
1811 rv = icMaxStatus(rv, icValidateCriticalError);
1815 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1816 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1817 sReport += icValidateCriticalErrorMsg;
1818 ! sReport += "Critical tag(s) missing.\n";
1819 rv = icMaxStatus(rv, icValidateCriticalError);
1824 if (m_Header.colorSpace == icSigGrayData) {
1825 if (!GetTag(icSigGrayTRCTag)) {
1826 sReport += icValidateCriticalErrorMsg;
1827 ! sReport += "Gray TRC tag missing.\r\n";
1828 rv = icMaxStatus(rv, icValidateCriticalError);
1832 if (m_Header.colorSpace == icSigGrayData) {
1833 if (!GetTag(icSigGrayTRCTag)) {
1834 sReport += icValidateCriticalErrorMsg;
1835 ! sReport += "Gray TRC tag missing.\n";
1836 rv = icMaxStatus(rv, icValidateCriticalError);
1841 !GetTag(icSigAToB1Tag) || !GetTag(icSigBToA1Tag) ||
1842 !GetTag(icSigAToB2Tag) || !GetTag(icSigBToA2Tag)) {
1843 sReport += icValidateCriticalErrorMsg;
1844 ! sReport += "Critical tag(s) missing.\r\n";
1845 rv = icMaxStatus(rv, icValidateCriticalError);
1848 if (!GetTag(icSigGamutTag)) {
1849 sReport += icValidateNonCompliantMsg;
1850 ! sReport += "Gamut tag missing.\r\n";
1851 rv = icMaxStatus(rv, icValidateNonCompliant);
1855 !GetTag(icSigAToB1Tag) || !GetTag(icSigBToA1Tag) ||
1856 !GetTag(icSigAToB2Tag) || !GetTag(icSigBToA2Tag)) {
1857 sReport += icValidateCriticalErrorMsg;
1858 ! sReport += "Critical tag(s) missing.\n";
1859 rv = icMaxStatus(rv, icValidateCriticalError);
1862 if (!GetTag(icSigGamutTag)) {
1863 sReport += icValidateNonCompliantMsg;
1864 ! sReport += "Gamut tag missing.\n";
1865 rv = icMaxStatus(rv, icValidateNonCompliant);
1870 case icSig16colorData:
1871 if (!GetTag(icSigColorantTableTag)) {
1872 sReport += icValidateNonCompliantMsg;
1873 ! sReport += "xCLR output profile is missing colorantTableTag\r\n";
1874 rv = icMaxStatus(rv, icValidateNonCompliant);
1878 case icSig16colorData:
1879 if (!GetTag(icSigColorantTableTag)) {
1880 sReport += icValidateNonCompliantMsg;
1881 ! sReport += "xCLR output profile is missing colorantTableTag\n";
1882 rv = icMaxStatus(rv, icValidateNonCompliant);
1887 case icSigLinkClass:
1888 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigProfileSequenceDescTag)) {
1889 sReport += icValidateCriticalErrorMsg;
1890 ! sReport += "Critical tag(s) missing.\r\n";
1891 rv = icMaxStatus(rv, icValidateCriticalError);
1895 case icSigLinkClass:
1896 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigProfileSequenceDescTag)) {
1897 sReport += icValidateCriticalErrorMsg;
1898 ! sReport += "Critical tag(s) missing.\n";
1899 rv = icMaxStatus(rv, icValidateCriticalError);
1904 if (icIsSpaceCLR(m_Header.colorSpace)) {
1905 if (!GetTag(icSigColorantTableTag)) {
1906 sReport += icValidateNonCompliantMsg;
1907 ! sReport += "Required tag(s) missing.\r\n";
1908 rv = icMaxStatus(rv, icValidateNonCompliant);
1912 if (icIsSpaceCLR(m_Header.colorSpace)) {
1913 if (!GetTag(icSigColorantTableTag)) {
1914 sReport += icValidateNonCompliantMsg;
1915 ! sReport += "Required tag(s) missing.\n";
1916 rv = icMaxStatus(rv, icValidateNonCompliant);
1921 if (icIsSpaceCLR(m_Header.pcs)) {
1922 if (!GetTag(icSigColorantTableOutTag)) {
1923 sReport += icValidateNonCompliantMsg;
1924 ! sReport += "Required tag(s) missing.\r\n";
1925 rv = icMaxStatus(rv, icValidateNonCompliant);
1929 if (icIsSpaceCLR(m_Header.pcs)) {
1930 if (!GetTag(icSigColorantTableOutTag)) {
1931 sReport += icValidateNonCompliantMsg;
1932 ! sReport += "Required tag(s) missing.\n";
1933 rv = icMaxStatus(rv, icValidateNonCompliant);
1938 case icSigColorSpaceClass:
1939 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigBToA0Tag)) {
1940 sReport += icValidateCriticalErrorMsg;
1941 ! sReport += "Critical tag(s) missing.\r\n";
1942 rv = icMaxStatus(rv, icValidateCriticalError);
1946 case icSigColorSpaceClass:
1947 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigBToA0Tag)) {
1948 sReport += icValidateCriticalErrorMsg;
1949 ! sReport += "Critical tag(s) missing.\n";
1950 rv = icMaxStatus(rv, icValidateCriticalError);
1955 case icSigAbstractClass:
1956 if (!GetTag(icSigAToB0Tag)) {
1957 sReport += icValidateCriticalErrorMsg;
1958 ! sReport += "Critical tag(s) missing.\r\n";
1959 rv = icMaxStatus(rv, icValidateCriticalError);
1963 case icSigAbstractClass:
1964 if (!GetTag(icSigAToB0Tag)) {
1965 sReport += icValidateCriticalErrorMsg;
1966 ! sReport += "Critical tag(s) missing.\n";
1967 rv = icMaxStatus(rv, icValidateCriticalError);
1972 case icSigNamedColorClass:
1973 if (!GetTag(icSigNamedColor2Tag)) {
1974 sReport += icValidateCriticalErrorMsg;
1975 ! sReport += "Critical tag(s) missing.\r\n";
1976 rv = icMaxStatus(rv, icValidateCriticalError);
1980 case icSigNamedColorClass:
1981 if (!GetTag(icSigNamedColor2Tag)) {
1982 sReport += icValidateCriticalErrorMsg;
1983 ! sReport += "Critical tag(s) missing.\n";
1984 rv = icMaxStatus(rv, icValidateCriticalError);
1991 sReport += icValidateCriticalErrorMsg;
1992 ! sReport += "Unknown Profile Class.\r\n";
1993 rv = icMaxStatus(rv, icValidateCriticalError);
1999 sReport += icValidateCriticalErrorMsg;
2000 ! sReport += "Unknown Profile Class.\n";
2001 rv = icMaxStatus(rv, icValidateCriticalError);
2006 // Check for duplicate tags
2007 if (!AreTagsUnique()) {
2008 sReport += icValidateWarning;
2009 ! sReport += " - There are duplicate tags.\r\n";
2010 rv =icMaxStatus(rv, icValidateWarning);
2014 // Check for duplicate tags
2015 if (!AreTagsUnique()) {
2016 sReport += icValidateWarning;
2017 ! sReport += " - There are duplicate tags.\n";
2018 rv =icMaxStatus(rv, icValidateWarning);
2023 sReport = icValidateCriticalErrorMsg;
2025 sReport += szFilename;
2026 ! sReport += "- Invalid Filename\r\n";
2031 sReport = icValidateCriticalErrorMsg;
2033 sReport += szFilename;
2034 ! sReport += "- Invalid Filename\n";
2038 *** misc/SampleICC-1.3.2/IccProfLib/IccTagBasic.cpp Mon Aug 20 22:05:00 2007
2039 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagBasic.cpp Fri Jan 25 14:23:09 2008
2043 sReport += icValidateNonCompliantMsg;
2044 sReport += Info.GetSigName(sig);
2045 ! sReport += " - Reserved Value must be zero.\r\n";
2047 rv = icValidateNonCompliant;
2051 sReport += icValidateNonCompliantMsg;
2052 sReport += Info.GetSigName(sig);
2053 ! sReport += " - Reserved Value must be zero.\n";
2055 rv = icValidateNonCompliant;
2059 sprintf(buf, "%u Bytes.", m_nSize-4);
2060 sDescription += buf;
2062 ! sDescription += "\r\n\r\nData Follows:\r\n";
2064 icMemDump(sDescription, m_pData+4, m_nSize-4);
2067 sprintf(buf, "%u Bytes.", m_nSize-4);
2068 sDescription += buf;
2070 ! sDescription += "\n\nData Follows:\n";
2072 icMemDump(sDescription, m_pData+4, m_nSize-4);
2076 if (m_szText && *m_szText)
2077 sDescription += m_szText;
2079 ! sDescription += "\"\r\n";
2084 if (m_szText && *m_szText)
2085 sDescription += m_szText;
2087 ! sDescription += "\"\n";
2094 sReport += icValidateNonCompliantMsg;
2095 sReport += sSigName;
2096 ! sReport += " - Tag must have at least seven text characters.\r\n";
2097 rv = icMaxStatus(rv, icValidateNonCompliant);
2102 sReport += icValidateNonCompliantMsg;
2103 sReport += sSigName;
2104 ! sReport += " - Tag must have at least seven text characters.\n";
2105 rv = icMaxStatus(rv, icValidateNonCompliant);
2111 sReport += icValidateWarningMsg;
2112 sReport += sSigName;
2113 ! sReport += " - Unknown Tag.\r\n";
2114 rv = icMaxStatus(rv, icValidateWarning);
2119 sReport += icValidateWarningMsg;
2120 sReport += sSigName;
2121 ! sReport += " - Unknown Tag.\n";
2122 rv = icMaxStatus(rv, icValidateWarning);
2127 if (m_szText[i]&0x80) {
2128 sReport += icValidateWarning;
2129 sReport += sSigName;
2130 ! sReport += " - Text do not contain 7bit data.\r\n";
2135 if (m_szText[i]&0x80) {
2136 sReport += icValidateWarning;
2137 sReport += sSigName;
2138 ! sReport += " - Text do not contain 7bit data.\n";
2145 sReport += icValidateWarningMsg;
2146 sReport += sSigName;
2147 ! sReport += " - Empty Tag.\r\n";
2148 rv = icMaxStatus(rv, icValidateWarning);
2153 sReport += icValidateWarningMsg;
2154 sReport += sSigName;
2155 ! sReport += " - Empty Tag.\n";
2156 rv = icMaxStatus(rv, icValidateWarning);
2161 if (m_szText && *m_szText)
2162 sDescription += m_szText;
2164 ! sDescription += "\"\r\n";
2169 if (m_szText && *m_szText)
2170 sDescription += m_szText;
2172 ! sDescription += "\"\n";
2178 if (m_nScriptSize>67) {
2179 sReport += icValidateNonCompliantMsg;
2180 sReport += sSigName;
2181 ! sReport += " - ScriptCode count must not be greater than 67.\r\n";
2183 rv =icMaxStatus(rv, icValidateNonCompliant);
2186 if (m_nScriptSize>67) {
2187 sReport += icValidateNonCompliantMsg;
2188 sReport += sSigName;
2189 ! sReport += " - ScriptCode count must not be greater than 67.\n";
2191 rv =icMaxStatus(rv, icValidateNonCompliant);
2197 sDescription += Fmt.GetSigName(m_nSig);
2198 ! sDescription += "\r\n";
2205 sDescription += Fmt.GetSigName(m_nSig);
2206 ! sDescription += "\n";
2213 sReport += icValidateNonCompliantMsg;
2214 sReport += sSigName;
2215 ! sprintf(buf, " - %s: Unknown Technology.\r\n", Info.GetSigName(m_nSig));
2217 rv = icMaxStatus(rv, icValidateNonCompliant);
2221 sReport += icValidateNonCompliantMsg;
2222 sReport += sSigName;
2223 ! sprintf(buf, " - %s: Unknown Technology.\n", Info.GetSigName(m_nSig));
2225 rv = icMaxStatus(rv, icValidateNonCompliant);
2230 sReport += icValidateNonCompliantMsg;
2231 sReport += sSigName;
2232 ! sprintf(buf, " - %s: Unknown Reference Medium Gamut.\r\n", Info.GetSigName(m_nSig));
2234 rv = icMaxStatus(rv, icValidateNonCompliant);
2238 sReport += icValidateNonCompliantMsg;
2239 sReport += sSigName;
2240 ! sprintf(buf, " - %s: Unknown Reference Medium Gamut.\n", Info.GetSigName(m_nSig));
2242 rv = icMaxStatus(rv, icValidateNonCompliant);
2247 sReport += icValidateNonCompliantMsg;
2248 sReport += sSigName;
2249 ! sprintf(buf, " - %s: Unknown Colorimetric Intent Image State.\r\n", Info.GetSigName(m_nSig));
2251 rv = icMaxStatus(rv, icValidateNonCompliant);
2255 sReport += icValidateNonCompliantMsg;
2256 sReport += sSigName;
2257 ! sprintf(buf, " - %s: Unknown Colorimetric Intent Image State.\n", Info.GetSigName(m_nSig));
2259 rv = icMaxStatus(rv, icValidateNonCompliant);
2264 sDescription.reserve(sDescription.size() + m_nSize*79);
2266 ! sprintf(buf, "BEGIN_NAMED_COLORS flags=%08x %u %u\r\n", m_nVendorFlags, m_nSize, m_nDeviceCoords);
2267 sDescription += buf;
2269 for (i=0; i<m_nSize; i++) {
2272 sDescription.reserve(sDescription.size() + m_nSize*79);
2274 ! sprintf(buf, "BEGIN_NAMED_COLORS flags=%08x %u %u\n", m_nVendorFlags, m_nSize, m_nDeviceCoords);
2275 sDescription += buf;
2277 for (i=0; i<m_nSize; i++) {
2280 sDescription += buf;
2283 ! sDescription += "\r\n";
2285 pNamedColor = (SIccNamedColorEntry*)((icChar*)pNamedColor + m_nColorEntrySize);
2288 sDescription += buf;
2291 ! sDescription += "\n";
2293 pNamedColor = (SIccNamedColorEntry*)((icChar*)pNamedColor + m_nColorEntrySize);
2298 sReport += icValidateWarningMsg;
2299 sReport += sSigName;
2300 ! sReport += " - Empty tag!\r\n";
2301 rv = icMaxStatus(rv, icValidateWarning);
2306 sReport += icValidateWarningMsg;
2307 sReport += sSigName;
2308 ! sReport += " - Empty tag!\n";
2309 rv = icMaxStatus(rv, icValidateWarning);
2314 if (m_nDeviceCoords != nCoords) {
2315 sReport += icValidateNonCompliantMsg;
2316 sReport += sSigName;
2317 ! sReport += " - Incorrect number of device co-ordinates.\r\n";
2318 rv = icMaxStatus(rv, icValidateNonCompliant);
2322 if (m_nDeviceCoords != nCoords) {
2323 sReport += icValidateNonCompliantMsg;
2324 sReport += sSigName;
2325 ! sReport += " - Incorrect number of device co-ordinates.\n";
2326 rv = icMaxStatus(rv, icValidateNonCompliant);
2332 sReport += icValidateWarningMsg;
2333 sReport += sSigName;
2334 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
2335 rv = icMaxStatus(rv, icValidateWarning);
2340 sReport += icValidateWarningMsg;
2341 sReport += sSigName;
2342 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
2343 rv = icMaxStatus(rv, icValidateWarning);
2350 if (m_nSize == 1 ) {
2351 ! 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));
2352 sDescription += buf;
2358 if (m_nSize == 1 ) {
2359 ! sprintf(buf, "X=%.4lf, Y=%.4lf, Z=%.4lf\n", icFtoD(m_XYZ[0].X), icFtoD(m_XYZ[0].Y), icFtoD(m_XYZ[0].Z));
2360 sDescription += buf;
2365 sDescription.reserve(sDescription.size() + m_nSize*79);
2367 for (i=0; i<m_nSize; i++) {
2368 ! 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));
2369 sDescription += buf;
2373 sDescription.reserve(sDescription.size() + m_nSize*79);
2375 for (i=0; i<m_nSize; i++) {
2376 ! 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));
2377 sDescription += buf;
2383 sReport += icValidateWarningMsg;
2384 sReport += sSigName;
2385 ! sReport += " - Empty tag.\r\n";
2387 rv = icMaxStatus(rv, icValidateWarning);
2391 sReport += icValidateWarningMsg;
2392 sReport += sSigName;
2393 ! sReport += " - Empty tag.\n";
2395 rv = icMaxStatus(rv, icValidateWarning);
2401 //sDescription.reserve(sDescription.size() + m_nChannels*79);
2402 ! sprintf(buf, "Number of Channels : %u\r\n", m_nChannels);
2403 sDescription += buf;
2405 ! sprintf(buf, "Colorant Encoding : %s\r\n", Fmt.GetColorantEncoding((icColorantEncoding)m_nColorantType));
2406 sDescription += buf;
2408 for (i=0; i<m_nChannels; i++) {
2409 ! sprintf(buf, "value[%u]: x=%.3lf, y=%.3lf\r\n", i, icUFtoD(m_xy[i].x), icUFtoD(m_xy[i].y));
2410 sDescription += buf;
2416 //sDescription.reserve(sDescription.size() + m_nChannels*79);
2417 ! sprintf(buf, "Number of Channels : %u\n", m_nChannels);
2418 sDescription += buf;
2420 ! sprintf(buf, "Colorant Encoding : %s\n", Fmt.GetColorantEncoding((icColorantEncoding)m_nColorantType));
2421 sDescription += buf;
2423 for (i=0; i<m_nChannels; i++) {
2424 ! sprintf(buf, "value[%u]: x=%.3lf, y=%.3lf\n", i, icUFtoD(m_xy[i].x), icUFtoD(m_xy[i].y));
2425 sDescription += buf;
2430 if (m_nChannels!=3) {
2431 sReport += icValidateCriticalErrorMsg;
2432 sReport += sSigName;
2433 ! sReport += " - Number of device channels must be three.\r\n";
2434 rv = icMaxStatus(rv, icValidateCriticalError);
2438 if (m_nChannels!=3) {
2439 sReport += icValidateCriticalErrorMsg;
2440 sReport += sSigName;
2441 ! sReport += " - Number of device channels must be three.\n";
2442 rv = icMaxStatus(rv, icValidateCriticalError);
2447 (m_xy[2].x != icDtoUF((icFloatNumber)0.150)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.060)) ) {
2448 sReport += icValidateNonCompliantMsg;
2449 sReport += sSigName;
2450 ! sReport += " - Chromaticity data does not match specification.\r\n";
2451 rv = icMaxStatus(rv, icValidateNonCompliant);
2455 (m_xy[2].x != icDtoUF((icFloatNumber)0.150)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.060)) ) {
2456 sReport += icValidateNonCompliantMsg;
2457 sReport += sSigName;
2458 ! sReport += " - Chromaticity data does not match specification.\n";
2459 rv = icMaxStatus(rv, icValidateNonCompliant);
2464 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2465 sReport += icValidateNonCompliantMsg;
2466 sReport += sSigName;
2467 ! sReport += " - Chromaticity data does not match specification.\r\n";
2468 rv = icMaxStatus(rv, icValidateNonCompliant);
2472 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2473 sReport += icValidateNonCompliantMsg;
2474 sReport += sSigName;
2475 ! sReport += " - Chromaticity data does not match specification.\n";
2476 rv = icMaxStatus(rv, icValidateNonCompliant);
2481 (m_xy[2].x != icDtoUF((icFloatNumber)0.15)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.06)) ) {
2482 sReport += icValidateNonCompliantMsg;
2483 sReport += sSigName;
2484 ! sReport += " - Chromaticity data does not match specification.\r\n";
2485 rv = icMaxStatus(rv, icValidateNonCompliant);
2489 (m_xy[2].x != icDtoUF((icFloatNumber)0.15)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.06)) ) {
2490 sReport += icValidateNonCompliantMsg;
2491 sReport += sSigName;
2492 ! sReport += " - Chromaticity data does not match specification.\n";
2493 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.\r\n";
2502 rv = icMaxStatus(rv, icValidateNonCompliant);
2506 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2507 sReport += icValidateNonCompliantMsg;
2508 sReport += sSigName;
2509 ! sReport += " - Chromaticity data does not match specification.\n";
2510 rv = icMaxStatus(rv, icValidateNonCompliant);
2516 sReport += icValidateNonCompliantMsg;
2517 sReport += sSigName;
2518 ! sReport += " - Invalid colorant type encoding.\r\n";
2519 rv = icMaxStatus(rv, icValidateNonCompliant);
2524 sReport += icValidateNonCompliantMsg;
2525 sReport += sSigName;
2526 ! sReport += " - Invalid colorant type encoding.\n";
2527 rv = icMaxStatus(rv, icValidateNonCompliant);
2533 if (m_nSize == 1 ) {
2534 if (Tsig==icSigS15Fixed16ArrayType)
2535 ! sprintf(buf, "Value = %.4lf\r\n", icFtoD(m_Num[0]));
2537 ! sprintf(buf, "Value = %.4lf\r\n", icUFtoD(m_Num[0]));
2538 sDescription += buf;
2543 if (m_nSize == 1 ) {
2544 if (Tsig==icSigS15Fixed16ArrayType)
2545 ! sprintf(buf, "Value = %.4lf\n", icFtoD(m_Num[0]));
2547 ! sprintf(buf, "Value = %.4lf\n", icUFtoD(m_Num[0]));
2548 sDescription += buf;
2555 if (Tsig==icSigS15Fixed16ArrayType && m_nSize==9) {
2556 ! sDescription += "Matrix Form:\r\n";
2557 icMatrixDump(sDescription, (icS15Fixed16Number*)m_Num);
2559 ! sDescription += "\r\nArrayForm:\r\n";
2561 sDescription.reserve(sDescription.size() + m_nSize*79);
2563 for (i=0; i<m_nSize; i++) {
2564 if (Tsig==icSigS15Fixed16ArrayType)
2565 ! sprintf(buf, "Value[%u] = %.4lf\r\n", i, icFtoD(m_Num[i]));
2567 ! sprintf(buf, "Value[%u] = %.4lf\r\n", i, icUFtoD(m_Num[i]));
2568 sDescription += buf;
2574 if (Tsig==icSigS15Fixed16ArrayType && m_nSize==9) {
2575 ! sDescription += "Matrix Form:\n";
2576 icMatrixDump(sDescription, (icS15Fixed16Number*)m_Num);
2578 ! sDescription += "\nArrayForm:\n";
2580 sDescription.reserve(sDescription.size() + m_nSize*79);
2582 for (i=0; i<m_nSize; i++) {
2583 if (Tsig==icSigS15Fixed16ArrayType)
2584 ! sprintf(buf, "Value[%u] = %.4lf\n", i, icFtoD(m_Num[i]));
2586 ! sprintf(buf, "Value[%u] = %.4lf\n", i, icUFtoD(m_Num[i]));
2587 sDescription += buf;
2594 if (m_nSize == 1 ) {
2595 ! sprintf(buf, "Value = %u (0x%x)\r\n", m_Num[0], m_Num[0]);
2596 sDescription += buf;
2602 if (m_nSize == 1 ) {
2603 ! sprintf(buf, "Value = %u (0x%x)\n", m_Num[0], m_Num[0]);
2604 sDescription += buf;
2609 sDescription.reserve(sDescription.size() + m_nSize*79);
2611 for (i=0; i<m_nSize; i++) {
2612 ! sprintf(buf, "Value[%u] = %u (0x%x)\r\n", i, m_Num[i], m_Num[i]);
2613 sDescription += buf;
2617 sDescription.reserve(sDescription.size() + m_nSize*79);
2619 for (i=0; i<m_nSize; i++) {
2620 ! sprintf(buf, "Value[%u] = %u (0x%x)\n", i, m_Num[i], m_Num[i]);
2621 sDescription += buf;
2629 ! sDescription += Fmt.GetStandardObserverName(m_Data.stdObserver); sDescription += "\r\n";
2630 ! sprintf(buf, "Backing measurement: X=%.4lf, Y=%.4lf, Z=%.4lf\r\n",
2631 icFtoD(m_Data.backing.X),
2632 icFtoD(m_Data.backing.Y),
2633 icFtoD(m_Data.backing.Z));
2634 sDescription += buf;
2635 ! sDescription += Fmt.GetMeasurementGeometryName(m_Data.geometry); sDescription += "\r\n";
2636 ! sDescription += Fmt.GetMeasurementFlareName(m_Data.flare); sDescription += "\r\n";
2637 ! sDescription += Fmt.GetIlluminantName(m_Data.illuminant); sDescription += "\r\n";
2645 ! sDescription += Fmt.GetStandardObserverName(m_Data.stdObserver); sDescription += "\n";
2646 ! sprintf(buf, "Backing measurement: X=%.4lf, Y=%.4lf, Z=%.4lf\n",
2647 icFtoD(m_Data.backing.X),
2648 icFtoD(m_Data.backing.Y),
2649 icFtoD(m_Data.backing.Z));
2650 sDescription += buf;
2651 ! sDescription += Fmt.GetMeasurementGeometryName(m_Data.geometry); sDescription += "\n";
2652 ! sDescription += Fmt.GetMeasurementFlareName(m_Data.flare); sDescription += "\n";
2653 ! sDescription += Fmt.GetIlluminantName(m_Data.illuminant); sDescription += "\n";
2660 sReport += icValidateNonCompliantMsg;
2661 sReport += sSigName;
2662 ! sReport += " - Invalid standard observer encoding.\r\n";
2663 rv = icMaxStatus(rv, icValidateNonCompliant);
2668 sReport += icValidateNonCompliantMsg;
2669 sReport += sSigName;
2670 ! sReport += " - Invalid standard observer encoding.\n";
2671 rv = icMaxStatus(rv, icValidateNonCompliant);
2677 sReport += icValidateNonCompliantMsg;
2678 sReport += sSigName;
2679 ! sReport += " - Invalid measurement geometry encoding.\r\n";
2680 rv = icMaxStatus(rv, icValidateNonCompliant);
2685 sReport += icValidateNonCompliantMsg;
2686 sReport += sSigName;
2687 ! sReport += " - Invalid measurement geometry encoding.\n";
2688 rv = icMaxStatus(rv, icValidateNonCompliant);
2694 sReport += icValidateNonCompliantMsg;
2695 sReport += sSigName;
2696 ! sReport += " - Invalid standard illuminant encoding.\r\n";
2697 rv = icMaxStatus(rv, icValidateNonCompliant);
2702 sReport += icValidateNonCompliantMsg;
2703 sReport += sSigName;
2704 ! sReport += " - Invalid standard illuminant encoding.\n";
2705 rv = icMaxStatus(rv, icValidateNonCompliant);
2711 for (i=m_Strings->begin(); i!=m_Strings->end(); i++) {
2712 if (i!=m_Strings->begin())
2713 ! sDescription += "\r\n";
2715 ! sprintf(szBuf, "Language = '%c%c', Region = '%c%c'\r\n",
2716 i->m_nLanguageCode>>8, i->m_nLanguageCode,
2717 i->m_nCountryCode>>8, i->m_nCountryCode);
2721 for (i=m_Strings->begin(); i!=m_Strings->end(); i++) {
2722 if (i!=m_Strings->begin())
2723 ! sDescription += "\n";
2725 ! sprintf(szBuf, "Language = '%c%c', Region = '%c%c'\n",
2726 i->m_nLanguageCode>>8, i->m_nLanguageCode,
2727 i->m_nCountryCode>>8, i->m_nCountryCode);
2731 i->GetAnsi(szBuf, nSize);
2732 sDescription += "\"";
2733 sDescription += szBuf;
2734 ! sDescription += "\"\r\n";
2739 i->GetAnsi(szBuf, nSize);
2740 sDescription += "\"";
2741 sDescription += szBuf;
2742 ! sDescription += "\"\n";
2748 if (!m_Strings->size()) {
2749 sReport += icValidateWarningMsg;
2750 sReport += sSigName;
2751 ! sReport += " - Empty tag!\r\n";
2752 rv = icMaxStatus(rv, icValidateWarning);
2756 if (!m_Strings->size()) {
2757 sReport += icValidateWarningMsg;
2758 sReport += sSigName;
2759 ! sReport += " - Empty tag!\n";
2760 rv = icMaxStatus(rv, icValidateWarning);
2768 ! sDescription = "\r\nData:\r\n";
2770 if (IsTypeAscii()) {
2771 ! sprintf(buf, "%s\r\n", (icChar*)m_pData);
2772 sDescription += buf;
2775 for (int i = 0; i<(int)m_nSize; i++) {
2776 ! sprintf(buf, "%d\r\n", m_pData[i]);
2777 sDescription += buf;
2784 ! sDescription = "\nData:\n";
2786 if (IsTypeAscii()) {
2787 ! sprintf(buf, "%s\n", (icChar*)m_pData);
2788 sDescription += buf;
2791 for (int i = 0; i<(int)m_nSize; i++) {
2792 ! sprintf(buf, "%d\n", m_pData[i]);
2793 sDescription += buf;
2799 sReport += icValidateNonCompliantMsg;
2800 sReport += sSigName;
2801 ! sReport += " - Invalid data flag encoding.\r\n";
2802 rv = icMaxStatus(rv, icValidateNonCompliant);
2807 sReport += icValidateNonCompliantMsg;
2808 sReport += sSigName;
2809 ! sReport += " - Invalid data flag encoding.\n";
2810 rv = icMaxStatus(rv, icValidateNonCompliant);
2817 sDescription = "Date = ";
2818 ! sprintf(buf, "%u-%u-%u\r\n", m_DateTime.month, m_DateTime.day, m_DateTime.year);
2819 sDescription += buf;
2821 sDescription += "Time = ";
2822 ! sprintf(buf, "%u:%u:%u\r\n", m_DateTime.hours, m_DateTime.minutes, m_DateTime.seconds);
2823 sDescription += buf;
2829 sDescription = "Date = ";
2830 ! sprintf(buf, "%u-%u-%u\n", m_DateTime.month, m_DateTime.day, m_DateTime.year);
2831 sDescription += buf;
2833 sDescription += "Time = ";
2834 ! sprintf(buf, "%u:%u:%u\n", m_DateTime.hours, m_DateTime.minutes, m_DateTime.seconds);
2835 sDescription += buf;
2843 ! sprintf(buf, "Colorant Count : %u\r\n", m_nCount);
2844 sDescription += buf;
2845 ! sDescription += "Order of Colorants:\r\n";
2847 for (int i=0; i<(int)m_nCount; i++) {
2848 ! sprintf(buf, "%u\r\n", m_pData[i]);
2849 sDescription += buf;
2856 ! sprintf(buf, "Colorant Count : %u\n", m_nCount);
2857 sDescription += buf;
2858 ! sDescription += "Order of Colorants:\n";
2860 for (int i=0; i<(int)m_nCount; i++) {
2861 ! sprintf(buf, "%u\n", m_pData[i]);
2862 sDescription += buf;
2868 sReport += icValidateWarningMsg;
2869 sReport += sSigName;
2870 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
2871 rv = icMaxStatus(rv, icValidateWarning);
2876 sReport += icValidateWarningMsg;
2877 sReport += sSigName;
2878 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
2879 rv = icMaxStatus(rv, icValidateWarning);
2884 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
2885 sReport += icValidateNonCompliantMsg;
2886 sReport += sSigName;
2887 ! sReport += " - Incorrect number of colorants.\r\n";
2888 rv = icMaxStatus(rv, icValidateNonCompliant);
2892 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
2893 sReport += icValidateNonCompliantMsg;
2894 sReport += sSigName;
2895 ! sReport += " - Incorrect number of colorants.\n";
2896 rv = icMaxStatus(rv, icValidateNonCompliant);
2901 icUInt32Number i, nLen, nMaxLen=0;
2902 icFloatNumber Lab[3];
2904 ! sprintf(buf, "BEGIN_COLORANTS %u\r\n", m_nCount);
2905 sDescription += buf;
2907 for (i=0; i<m_nCount; i++) {
2909 icUInt32Number i, nLen, nMaxLen=0;
2910 icFloatNumber Lab[3];
2912 ! sprintf(buf, "BEGIN_COLORANTS %u\n", m_nCount);
2913 sDescription += buf;
2915 for (i=0; i<m_nCount; i++) {
2918 sDescription += "# NAME ";
2920 if (m_PCS == icSigXYZData) {
2921 ! sprintf(buf, "XYZ_X XYZ_Y XYZ_Z\r\n");
2922 sDescription += buf;
2925 ! sprintf(buf, "Lab_L Lab_a Lab_b\r\n");
2926 sDescription += buf;
2928 for (i=0; i<m_nCount; i++) {
2930 sDescription += "# NAME ";
2932 if (m_PCS == icSigXYZData) {
2933 ! sprintf(buf, "XYZ_X XYZ_Y XYZ_Z\n");
2934 sDescription += buf;
2937 ! sprintf(buf, "Lab_L Lab_a Lab_b\n");
2938 sDescription += buf;
2940 for (i=0; i<m_nCount; i++) {
2943 sDescription += buf;
2945 if (m_PCS == icSigXYZData) {
2946 ! 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]));
2947 sDescription += buf;
2951 sDescription += buf;
2953 if (m_PCS == icSigXYZData) {
2954 ! 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]));
2955 sDescription += buf;
2960 Lab[1] = icU16toF(m_pData[i].data[1]);
2961 Lab[2] = icU16toF(m_pData[i].data[2]);
2963 ! sprintf(buf, "%7.4lf %8.4lf %8.4lf\r\n", Lab[0], Lab[1], Lab[2]);
2964 sDescription += buf;
2968 Lab[1] = icU16toF(m_pData[i].data[1]);
2969 Lab[2] = icU16toF(m_pData[i].data[2]);
2971 ! sprintf(buf, "%7.4lf %8.4lf %8.4lf\n", Lab[0], Lab[1], Lab[2]);
2972 sDescription += buf;
2978 sReport += icValidateWarningMsg;
2979 sReport += sSigName;
2980 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
2981 rv = icMaxStatus(rv, icValidateWarning);
2986 sReport += icValidateWarningMsg;
2987 sReport += sSigName;
2988 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
2989 rv = icMaxStatus(rv, icValidateWarning);
2994 if (pProfile->m_Header.deviceClass!=icSigLinkClass) {
2995 sReport += icValidateNonCompliantMsg;
2996 sReport += sSigName;
2997 ! sReport += " - Use of this tag is allowed only in DeviceLink Profiles.\r\n";
2998 rv = icMaxStatus(rv, icValidateNonCompliant);
3002 if (pProfile->m_Header.deviceClass!=icSigLinkClass) {
3003 sReport += icValidateNonCompliantMsg;
3004 sReport += sSigName;
3005 ! sReport += " - Use of this tag is allowed only in DeviceLink Profiles.\n";
3006 rv = icMaxStatus(rv, icValidateNonCompliant);
3011 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3012 sReport += icValidateNonCompliantMsg;
3013 sReport += sSigName;
3014 ! sReport += " - Incorrect number of colorants.\r\n";
3015 rv = icMaxStatus(rv, icValidateNonCompliant);
3019 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3020 sReport += icValidateNonCompliantMsg;
3021 sReport += sSigName;
3022 ! sReport += " - Incorrect number of colorants.\n";
3023 rv = icMaxStatus(rv, icValidateNonCompliant);
3031 ! sprintf(buf, "Illuminant Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\r\n",
3032 icFtoD(m_XYZIllum.X),
3033 icFtoD(m_XYZIllum.Y),
3034 icFtoD(m_XYZIllum.Z));
3035 sDescription += buf;
3037 ! sprintf(buf, "Surround Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\r\n",
3038 icFtoD(m_XYZSurround.X),
3039 icFtoD(m_XYZSurround.Y),
3040 icFtoD(m_XYZSurround.Z));
3045 ! sprintf(buf, "Illuminant Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\n",
3046 icFtoD(m_XYZIllum.X),
3047 icFtoD(m_XYZIllum.Y),
3048 icFtoD(m_XYZIllum.Z));
3049 sDescription += buf;
3051 ! sprintf(buf, "Surround Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\n",
3052 icFtoD(m_XYZSurround.X),
3053 icFtoD(m_XYZSurround.Y),
3054 icFtoD(m_XYZSurround.Z));
3057 sDescription += "Illuminant Type: ";
3059 sDescription += Fmt.GetIlluminantName(m_illumType);
3060 ! sDescription += "\r\n";
3065 sDescription += "Illuminant Type: ";
3067 sDescription += Fmt.GetIlluminantName(m_illumType);
3068 ! sDescription += "\n";
3074 icChar buf[128], buf2[28];
3075 icUInt32Number count=0;
3077 ! sprintf(buf, "Number of Profile Description Structures: %u\r\n", m_Descriptions->size());
3078 sDescription += buf;
3080 for (i=m_Descriptions->begin(); i!=m_Descriptions->end(); i++, count++) {
3081 ! sDescription += "\r\n";
3083 ! sprintf(buf, "Profile Description Structure Number [%u] follows:\r\n", count+1);
3084 sDescription += buf;
3086 ! sprintf(buf, "Device Manufacturer Signature: %s\r\n", icGetSig(buf2, i->m_deviceMfg, false));
3087 sDescription += buf;
3089 ! sprintf(buf, "Device Model Signature: %s\r\n", icGetSig(buf2, i->m_deviceModel, false));
3090 sDescription += buf;
3092 ! sprintf(buf, "Device Attributes: %08x%08x\r\n", (icUInt32Number)(i->m_attributes >> 32), (icUInt32Number)(i->m_attributes));
3093 sDescription += buf;
3095 ! sprintf(buf, "Device Technology Signature: %s\r\n", icGetSig(buf2, i->m_technology, false));
3096 sDescription += buf;
3098 ! sprintf(buf, "Description of device manufacturer: \r\n");
3099 sDescription += buf;
3100 i->m_deviceMfgDesc.Describe(sDescription);
3102 ! sprintf(buf, "Description of device model: \r\n");
3103 sDescription += buf;
3104 i->m_deviceModelDesc.Describe(sDescription);
3107 icChar buf[128], buf2[28];
3108 icUInt32Number count=0;
3110 ! sprintf(buf, "Number of Profile Description Structures: %u\n", m_Descriptions->size());
3111 sDescription += buf;
3113 for (i=m_Descriptions->begin(); i!=m_Descriptions->end(); i++, count++) {
3114 ! sDescription += "\n";
3116 ! sprintf(buf, "Profile Description Structure Number [%u] follows:\n", count+1);
3117 sDescription += buf;
3119 ! sprintf(buf, "Device Manufacturer Signature: %s\n", icGetSig(buf2, i->m_deviceMfg, false));
3120 sDescription += buf;
3122 ! sprintf(buf, "Device Model Signature: %s\n", icGetSig(buf2, i->m_deviceModel, false));
3123 sDescription += buf;
3125 ! sprintf(buf, "Device Attributes: %08x%08x\n", (icUInt32Number)(i->m_attributes >> 32), (icUInt32Number)(i->m_attributes));
3126 sDescription += buf;
3128 ! sprintf(buf, "Device Technology Signature: %s\n", icGetSig(buf2, i->m_technology, false));
3129 sDescription += buf;
3131 ! sprintf(buf, "Description of device manufacturer: \n");
3132 sDescription += buf;
3133 i->m_deviceMfgDesc.Describe(sDescription);
3135 ! sprintf(buf, "Description of device model: \n");
3136 sDescription += buf;
3137 i->m_deviceModelDesc.Describe(sDescription);
3142 sReport += icValidateNonCompliantMsg;
3143 sReport += sSigName;
3144 ! sprintf(buf, " - %s: Unknown Technology.\r\n", Info.GetSigName(i->m_technology));
3146 rv = icMaxStatus(rv, icValidateNonCompliant);
3150 sReport += icValidateNonCompliantMsg;
3151 sReport += sSigName;
3152 ! sprintf(buf, " - %s: Unknown Technology.\n", Info.GetSigName(i->m_technology));
3154 rv = icMaxStatus(rv, icValidateNonCompliant);
3158 sReport += icValidateNonCompliantMsg;
3159 sReport += sSigName;
3161 ! sReport += " Contains non-aligned deviceMfgDesc text tag information\r\n";
3163 rv = icMaxStatus(rv, icValidateNonCompliant);
3166 sReport += icValidateNonCompliantMsg;
3167 sReport += sSigName;
3169 ! sReport += " Contains non-aligned deviceMfgDesc text tag information\n";
3171 rv = icMaxStatus(rv, icValidateNonCompliant);
3175 sReport += icValidateNonCompliantMsg;
3176 sReport += sSigName;
3178 ! sReport += " Contains non-aligned deviceModelDesc text tag information\r\n";
3180 rv = icMaxStatus(rv, icValidateNonCompliant);
3183 sReport += icValidateNonCompliantMsg;
3184 sReport += sSigName;
3186 ! sReport += " Contains non-aligned deviceModelDesc text tag information\n";
3188 rv = icMaxStatus(rv, icValidateNonCompliant);
3192 CIccResponse16List::iterator j;
3194 sDescription += "Measurement Unit: ";
3195 ! sDescription += Fmt.GetMeasurementUnit((icSignature)GetMeasurementType()); sDescription += "\r\n";
3198 for (int i=0; i<m_nChannels; i++) {
3199 nResponseList = m_Response16ListArray[i];
3201 ! sDescription += "\r\n";
3202 ! sprintf(buf, "Maximum Colorant XYZ Measurement for Channel-%u : X=%.4lf, Y=%.4lf, Z=%.4lf\r\n", i+1,
3203 icFtoD(m_maxColorantXYZ[i].X), icFtoD(m_maxColorantXYZ[i].Y), icFtoD(m_maxColorantXYZ[i].Z));
3204 sDescription += buf;
3206 ! sprintf(buf, "Number of Measurements for Channel-%u : %u\r\n", i+1, nResponseList.size());
3207 sDescription += buf;
3209 ! sprintf(buf, "Measurement Data for Channel-%u follows:\r\n", i+1);
3210 sDescription += buf;
3212 for (j=nResponseList.begin(); j!=nResponseList.end(); j++) {
3213 ! sprintf(buf, "Device Value= %u : Measurement Value= %.4lf\r\n", j->deviceCode, icFtoD(j->measurementValue));
3214 sDescription += buf;
3218 CIccResponse16List::iterator j;
3220 sDescription += "Measurement Unit: ";
3221 ! sDescription += Fmt.GetMeasurementUnit((icSignature)GetMeasurementType()); sDescription += "\n";
3224 for (int i=0; i<m_nChannels; i++) {
3225 nResponseList = m_Response16ListArray[i];
3227 ! sDescription += "\n";
3228 ! sprintf(buf, "Maximum Colorant XYZ Measurement for Channel-%u : X=%.4lf, Y=%.4lf, Z=%.4lf\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\n", i+1, nResponseList.size());
3233 sDescription += buf;
3235 ! sprintf(buf, "Measurement Data for Channel-%u follows:\n", i+1);
3236 sDescription += buf;
3238 for (j=nResponseList.begin(); j!=nResponseList.end(); j++) {
3239 ! sprintf(buf, "Device Value= %u : Measurement Value= %.4lf\n", j->deviceCode, icFtoD(j->measurementValue));
3240 sDescription += buf;
3246 sReport += icValidateNonCompliantMsg;
3247 sReport += sSigName;
3248 ! sReport += " - Unknown measurement unit signature.\r\n";
3249 rv = icMaxStatus(rv, icValidateNonCompliant);
3254 sReport += icValidateNonCompliantMsg;
3255 sReport += sSigName;
3256 ! sReport += " - Unknown measurement unit signature.\n";
3257 rv = icMaxStatus(rv, icValidateNonCompliant);
3263 sReport += icValidateNonCompliantMsg;
3264 sReport += sSigName;
3265 ! sReport += " - Incorrect number of channels.\r\n";
3266 rv = icMaxStatus(rv, icValidateNonCompliant);
3271 sReport += icValidateNonCompliantMsg;
3272 sReport += sSigName;
3273 ! sReport += " - Incorrect number of channels.\n";
3274 rv = icMaxStatus(rv, icValidateNonCompliant);
3279 CIccResponseCurveSet::iterator i;
3282 ! sprintf(buf, "Number of Channels: %u\r\n", m_nChannels);
3283 sDescription += buf;
3285 ! sprintf(buf, "Number of Measurement Types used: %u\r\n", m_ResponseCurves->size());
3286 sDescription += buf;
3289 for (i=m_ResponseCurves->begin(); i!=m_ResponseCurves->end(); i++, count++) {
3290 ! sDescription += "\r\n";
3292 ! sprintf(buf, "Response Curve for measurement type [%u] follows:\r\n", count+1);
3293 sDescription += buf;
3295 i->Describe(sDescription);
3297 CIccResponseCurveSet::iterator i;
3300 ! sprintf(buf, "Number of Channels: %u\n", m_nChannels);
3301 sDescription += buf;
3303 ! sprintf(buf, "Number of Measurement Types used: %u\n", m_ResponseCurves->size());
3304 sDescription += buf;
3307 for (i=m_ResponseCurves->begin(); i!=m_ResponseCurves->end(); i++, count++) {
3308 ! sDescription += "\n";
3310 ! sprintf(buf, "Response Curve for measurement type [%u] follows:\n", count+1);
3311 sDescription += buf;
3313 i->Describe(sDescription);
3317 sReport += icValidateWarningMsg;
3318 sReport += sSigName;
3319 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
3320 rv = icMaxStatus(rv, icValidateWarning);
3325 sReport += icValidateWarningMsg;
3326 sReport += sSigName;
3327 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
3328 rv = icMaxStatus(rv, icValidateWarning);
3333 if (m_nChannels!=icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3334 sReport += icValidateWarningMsg;
3335 sReport += sSigName;
3336 ! sReport += " - Incorrect number of channels.\r\n";
3339 if (!GetNumResponseCurveTypes()) {
3340 sReport += icValidateWarningMsg;
3341 sReport += sSigName;
3342 ! sReport += " - Empty Tag!.\r\n";
3343 rv = icMaxStatus(rv, icValidateWarning);
3347 if (m_nChannels!=icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3348 sReport += icValidateWarningMsg;
3349 sReport += sSigName;
3350 ! sReport += " - Incorrect number of channels.\n";
3353 if (!GetNumResponseCurveTypes()) {
3354 sReport += icValidateWarningMsg;
3355 sReport += sSigName;
3356 ! sReport += " - Empty Tag!.\n";
3357 rv = icMaxStatus(rv, icValidateWarning);
3360 *** misc/SampleICC-1.3.2/IccProfLib/IccTagLut.cpp Mon Aug 20 22:05:00 2007
3361 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagLut.cpp Fri Jan 25 14:23:09 2008
3364 icChar buf[128], *ptr;
3367 ! sprintf(buf, "BEGIN_CURVE In_Out\r\n");
3368 sDescription += buf;
3369 ! sDescription += "Y = X\r\n";
3371 else if (m_nSize==1) {
3372 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3373 ! sprintf(buf, "BEGIN_CURVE In_Out\r\n");
3374 sDescription += buf;
3375 ! sprintf(buf, "Y = X ^ %.4lf\r\n", dGamma);
3376 sDescription += buf;
3381 ! sprintf(buf, "BEGIN_LUT In_Out 1 1\r\n");
3382 sDescription += buf;
3383 ! sDescription += "IN OUT\r\n";
3385 for (i=0; i<(int)m_nSize; i++) {
3388 icChar buf[128], *ptr;
3391 ! sprintf(buf, "BEGIN_CURVE In_Out\n");
3392 sDescription += buf;
3393 ! sDescription += "Y = X\n";
3395 else if (m_nSize==1) {
3396 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3397 ! sprintf(buf, "BEGIN_CURVE In_Out\n");
3398 sDescription += buf;
3399 ! sprintf(buf, "Y = X ^ %.4lf\n", dGamma);
3400 sDescription += buf;
3405 ! sprintf(buf, "BEGIN_LUT In_Out 1 1\n");
3406 sDescription += buf;
3407 ! sDescription += "IN OUT\n";
3409 for (i=0; i<(int)m_nSize; i++) {
3416 ! strcpy(ptr, "\r\n");
3418 sDescription += buf;
3421 ! sDescription += "\r\n";
3429 ! strcpy(ptr, "\n");
3431 sDescription += buf;
3434 ! sDescription += "\n";
3440 icChar buf[128], *ptr;
3443 ! sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
3444 sDescription += buf;
3445 ! sDescription += "Y = X\r\n";
3447 else if (m_nSize==1) {
3448 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3449 ! sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
3450 sDescription += buf;
3451 ! sprintf(buf, "Y = X ^ %.4lf\r\n", dGamma);
3452 sDescription += buf;
3457 ! sprintf(buf, "BEGIN_LUT %s 1 1\r\n", szName);
3458 sDescription += buf;
3459 ! sDescription += "IN OUT\r\n";
3461 sDescription.reserve(sDescription.size() + m_nSize * 20);
3464 icChar buf[128], *ptr;
3467 ! sprintf(buf, "BEGIN_CURVE %s\n", szName);
3468 sDescription += buf;
3469 ! sDescription += "Y = X\n";
3471 else if (m_nSize==1) {
3472 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3473 ! sprintf(buf, "BEGIN_CURVE %s\n", szName);
3474 sDescription += buf;
3475 ! sprintf(buf, "Y = X ^ %.4lf\n", dGamma);
3476 sDescription += buf;
3481 ! sprintf(buf, "BEGIN_LUT %s 1 1\n", szName);
3482 sDescription += buf;
3483 ! sDescription += "IN OUT\n";
3485 sDescription.reserve(sDescription.size() + m_nSize * 20);
3492 ! strcpy(ptr, "\r\n");
3494 sDescription += buf;
3497 ! sDescription += "\r\n";
3505 ! strcpy(ptr, "\n");
3507 sDescription += buf;
3510 ! sDescription += "\n";
3516 if (m_Curve[0]>0.0 || m_Curve[m_nSize-1]<1.0) {
3517 sReport += icValidateWarningMsg;
3518 sReport += sSigName;
3519 ! sReport += " - Curve cannot be accurately inverted.\r\n";
3520 rv = icMaxStatus(rv, icValidateWarning);
3524 if (m_Curve[0]>0.0 || m_Curve[m_nSize-1]<1.0) {
3525 sReport += icValidateWarningMsg;
3526 sReport += sSigName;
3527 ! sReport += " - Curve cannot be accurately inverted.\n";
3528 rv = icMaxStatus(rv, icValidateWarning);
3536 ! sprintf(buf, "FunctionType: %04Xh\r\n", m_nFunctionType);
3537 sDescription += buf;
3539 switch(m_nFunctionType) {
3541 ! sprintf(buf, "Y = X ^ %.4lf\r\n", icFtoD(m_Param[0]));
3542 sDescription += buf;
3546 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf / %.4lf)\r\n",
3547 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3548 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3549 sDescription += buf;
3551 ! sprintf(buf, "Y = 0 when (X < %.4lf / %.4lf)\r\n",
3552 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3553 sDescription += buf;
3557 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf / %.4lf)\r\n",
3558 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3560 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3561 sDescription += buf;
3563 ! sprintf(buf, "Y = %.4lf when (X < %.4lf / %.4lf)\r\n", icFtoD(m_Param[3]),
3564 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3565 sDescription += buf;
3569 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf)\r\n",
3570 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3571 icFtoD(m_Param[4]));
3572 sDescription += buf;
3574 ! sprintf(buf, "Y = %lf * X when (X < %.4lf)\r\n",
3575 icFtoD(m_Param[3]), icFtoD(m_Param[4]));
3576 sDescription += buf;
3580 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf)\r\n",
3581 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3582 icFtoD(m_Param[5]), icFtoD(m_Param[4]));
3583 sDescription += buf;
3585 ! sprintf(buf, "Y = %lf * X + %.4lf when (X < %.4lf)\r\n",
3586 icFtoD(m_Param[3]), icFtoD(m_Param[6]), icFtoD(m_Param[4]));
3587 sDescription += buf;
3593 ! sprintf(buf, "FunctionType: %04Xh\n", m_nFunctionType);
3594 sDescription += buf;
3596 switch(m_nFunctionType) {
3598 ! sprintf(buf, "Y = X ^ %.4lf\n", icFtoD(m_Param[0]));
3599 sDescription += buf;
3603 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf / %.4lf)\n",
3604 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3605 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3606 sDescription += buf;
3608 ! sprintf(buf, "Y = 0 when (X < %.4lf / %.4lf)\n",
3609 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3610 sDescription += buf;
3614 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf / %.4lf)\n",
3615 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3617 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3618 sDescription += buf;
3620 ! sprintf(buf, "Y = %.4lf when (X < %.4lf / %.4lf)\n", icFtoD(m_Param[3]),
3621 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3622 sDescription += buf;
3626 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf)\n",
3627 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3628 icFtoD(m_Param[4]));
3629 sDescription += buf;
3631 ! sprintf(buf, "Y = %lf * X when (X < %.4lf)\n",
3632 icFtoD(m_Param[3]), icFtoD(m_Param[4]));
3633 sDescription += buf;
3637 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf)\n",
3638 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3639 icFtoD(m_Param[5]), icFtoD(m_Param[4]));
3640 sDescription += buf;
3642 ! sprintf(buf, "Y = %lf * X + %.4lf when (X < %.4lf)\n",
3643 icFtoD(m_Param[3]), icFtoD(m_Param[6]), icFtoD(m_Param[4]));
3644 sDescription += buf;
3651 ! sprintf(buf, "Unknown Function with %d parameters:\r\n");
3652 sDescription += buf;
3654 for (i=0; i<m_nNumParam; i++) {
3655 ! sprintf(buf, "Param[%d] = %.4lf\r\n", i, icFtoD(m_Param[i]));
3656 sDescription += buf;
3663 ! sprintf(buf, "Unknown Function with %d parameters:\n", m_nNumParam);
3664 sDescription += buf;
3666 for (i=0; i<m_nNumParam; i++) {
3667 ! sprintf(buf, "Param[%d] = %.4lf\n", i, icFtoD(m_Param[i]));
3668 sDescription += buf;
3676 ! sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
3677 sDescription += buf;
3678 Describe(sDescription);
3679 ! sDescription += "\r\n";
3687 ! sprintf(buf, "BEGIN_CURVE %s\n", szName);
3688 sDescription += buf;
3689 Describe(sDescription);
3690 ! sDescription += "\n";
3696 if (m_nReserved2!=0) {
3697 sReport += icValidateNonCompliantMsg;
3698 sReport += sSigName;
3699 ! sReport += " - Reserved Value must be zero.\r\n";
3701 rv = icMaxStatus(rv, icValidateNonCompliant);
3704 if (m_nReserved2!=0) {
3705 sReport += icValidateNonCompliantMsg;
3706 sReport += sSigName;
3707 ! sReport += " - Reserved Value must be zero.\n";
3709 rv = icMaxStatus(rv, icValidateNonCompliant);
3713 if (m_nNumParam!=1) {
3714 sReport += icValidateCriticalErrorMsg;
3715 sReport += sSigName;
3716 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3717 rv = icMaxStatus(rv, icValidateCriticalError);
3721 if (m_nNumParam!=1) {
3722 sReport += icValidateCriticalErrorMsg;
3723 sReport += sSigName;
3724 ! sReport += " - Number of parameters inconsistent with function type.\n";
3725 rv = icMaxStatus(rv, icValidateCriticalError);
3730 if (m_nNumParam!=3) {
3731 sReport += icValidateCriticalErrorMsg;
3732 sReport += sSigName;
3733 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3734 rv = icMaxStatus(rv, icValidateCriticalError);
3738 if (m_nNumParam!=3) {
3739 sReport += icValidateCriticalErrorMsg;
3740 sReport += sSigName;
3741 ! sReport += " - Number of parameters inconsistent with function type.\n";
3742 rv = icMaxStatus(rv, icValidateCriticalError);
3747 if (m_nNumParam!=4) {
3748 sReport += icValidateCriticalErrorMsg;
3749 sReport += sSigName;
3750 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3751 rv = icMaxStatus(rv, icValidateCriticalError);
3755 if (m_nNumParam!=4) {
3756 sReport += icValidateCriticalErrorMsg;
3757 sReport += sSigName;
3758 ! sReport += " - Number of parameters inconsistent with function type.\n";
3759 rv = icMaxStatus(rv, icValidateCriticalError);
3764 if (m_nNumParam!=5) {
3765 sReport += icValidateCriticalErrorMsg;
3766 sReport += sSigName;
3767 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3768 rv = icMaxStatus(rv, icValidateCriticalError);
3772 if (m_nNumParam!=5) {
3773 sReport += icValidateCriticalErrorMsg;
3774 sReport += sSigName;
3775 ! sReport += " - Number of parameters inconsistent with function type.\n";
3776 rv = icMaxStatus(rv, icValidateCriticalError);
3781 if (m_nNumParam!=7) {
3782 sReport += icValidateCriticalErrorMsg;
3783 sReport += sSigName;
3784 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3785 rv = icMaxStatus(rv, icValidateCriticalError);
3789 if (m_nNumParam!=7) {
3790 sReport += icValidateCriticalErrorMsg;
3791 sReport += sSigName;
3792 ! sReport += " - Number of parameters inconsistent with function type.\n";
3793 rv = icMaxStatus(rv, icValidateCriticalError);
3799 sReport += icValidateCriticalErrorMsg;
3800 sReport += sSigName;
3801 ! sReport += " - Unknown function type.\r\n";
3802 rv = icMaxStatus(rv, icValidateCriticalError);
3807 sReport += icValidateCriticalErrorMsg;
3808 sReport += sSigName;
3809 ! sReport += " - Unknown function type.\n";
3810 rv = icMaxStatus(rv, icValidateCriticalError);
3815 if (lval>0.0 || uval<1.0) {
3816 sReport += icValidateWarningMsg;
3817 sReport += sSigName;
3818 ! sReport += " - Curve cannot be accurately inverted.\r\n";
3819 rv = icMaxStatus(rv, icValidateWarning);
3823 if (lval>0.0 || uval<1.0) {
3824 sReport += icValidateWarningMsg;
3825 sReport += sSigName;
3826 ! sReport += " - Curve cannot be accurately inverted.\n";
3827 rv = icMaxStatus(rv, icValidateWarning);
3835 ! sprintf(buf, "BEGIN_MATRIX %s\r\n", szName);
3836 sDescription += buf;
3838 if (!m_bUseConstants) {
3839 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
3840 m_e[0], m_e[1], m_e[2]);
3841 sDescription += buf;
3842 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
3843 m_e[3], m_e[4], m_e[5]);
3844 sDescription += buf;
3845 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
3846 m_e[6], m_e[7], m_e[8]);
3847 sDescription += buf;
3850 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
3851 m_e[0], m_e[1], m_e[2], m_e[9]);
3852 sDescription += buf;
3853 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
3854 m_e[3], m_e[4], m_e[5], m_e[10]);
3855 sDescription += buf;
3856 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
3857 m_e[6], m_e[7], m_e[8], m_e[11]);
3858 sDescription += buf;
3860 ! sDescription += "\r\n";
3868 ! sprintf(buf, "BEGIN_MATRIX %s\n", szName);
3869 sDescription += buf;
3871 if (!m_bUseConstants) {
3872 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
3873 m_e[0], m_e[1], m_e[2]);
3874 sDescription += buf;
3875 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
3876 m_e[3], m_e[4], m_e[5]);
3877 sDescription += buf;
3878 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
3879 m_e[6], m_e[7], m_e[8]);
3880 sDescription += buf;
3883 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
3884 m_e[0], m_e[1], m_e[2], m_e[9]);
3885 sDescription += buf;
3886 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
3887 m_e[3], m_e[4], m_e[5], m_e[10]);
3888 sDescription += buf;
3889 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
3890 m_e[6], m_e[7], m_e[8], m_e[11]);
3891 sDescription += buf;
3893 ! sDescription += "\n";
3899 if (m_e[0]!=1.0 || m_e[4]!=1.0 || m_e[9]!=1.0 || sum!=3.0) {
3900 sReport += icValidateNonCompliantMsg;
3901 sReport += sSigName;
3902 ! sReport += " - Matrix must be identity.\r\n";
3903 rv = icValidateNonCompliant;
3907 if (m_e[0]!=1.0 || m_e[4]!=1.0 || m_e[9]!=1.0 || sum!=3.0) {
3908 sReport += icValidateNonCompliantMsg;
3909 sReport += sSigName;
3910 ! sReport += " - Matrix must be identity.\n";
3911 rv = icValidateNonCompliant;
3917 ptr += sprintf(ptr, " %s", m_pVal);
3919 ! strcpy(ptr, "\r\n");
3920 sDescription += (const icChar*)m_pOutText;
3925 ptr += sprintf(ptr, " %s", m_pVal);
3927 ! strcpy(ptr, "\n");
3928 sDescription += (const icChar*)m_pOutText;
3933 icChar szOutText[2048], szColor[40];
3936 ! sprintf(szOutText, "BEGIN_LUT %s %d %d\r\n", szName, m_nInput, m_nOutput);
3937 sDescription += szOutText;
3939 for (i=0; i<m_nInput; i++) {
3941 icChar szOutText[2048], szColor[40];
3944 ! sprintf(szOutText, "BEGIN_LUT %s %d %d\n", szName, m_nInput, m_nOutput);
3945 sDescription += szOutText;
3947 for (i=0; i<m_nInput; i++) {
3950 sDescription += szOutText;
3953 ! sDescription += "\r\n";
3956 for (i=0; i<m_nInput; i++) {
3958 sDescription += szOutText;
3961 ! sDescription += "\n";
3964 for (i=0; i<m_nInput; i++) {
3968 Iterate(sDescription, 0, 0);
3970 ! sDescription += "\r\n";
3976 Iterate(sDescription, 0, 0);
3978 ! sDescription += "\n";
3984 if (m_nReserved2[0]!=0 || m_nReserved2[1]!=0 || m_nReserved2[2]!=0) {
3985 sReport += icValidateNonCompliantMsg;
3986 sReport += sSigName;
3987 ! sReport += " - Reserved Value must be zero.\r\n";
3989 rv = icValidateNonCompliant;
3992 if (m_nReserved2[0]!=0 || m_nReserved2[1]!=0 || m_nReserved2[2]!=0) {
3993 sReport += icValidateNonCompliantMsg;
3994 sReport += sSigName;
3995 ! sReport += " - Reserved Value must be zero.\n";
3997 rv = icValidateNonCompliant;
4001 if (m_GridPoints[i]<2) {
4002 sReport += icValidateCriticalErrorMsg;
4003 sReport += sSigName;
4004 ! sprintf(temp, " - CLUT: At least 2 grid points should be present in dimension %u.\r\n",i );
4006 rv = icMaxStatus(rv, icValidateCriticalError);
4009 if (m_GridPoints[i]<2) {
4010 sReport += icValidateCriticalErrorMsg;
4011 sReport += sSigName;
4012 ! sprintf(temp, " - CLUT: At least 2 grid points should be present in dimension %u.\n",i );
4014 rv = icMaxStatus(rv, icValidateCriticalError);
4019 sReport += icValidateWarningMsg;
4020 sReport += sSigName;
4021 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
4022 rv = icMaxStatus(rv, icValidateWarning);
4027 sReport += icValidateWarningMsg;
4028 sReport += sSigName;
4029 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
4030 rv = icMaxStatus(rv, icValidateWarning);
4035 if (m_nInput!=nInput) {
4036 sReport += icValidateCriticalErrorMsg;
4037 sReport += sSigName;
4038 ! sReport += " - Incorrect number of input channels.\r\n";
4039 rv = icMaxStatus(rv, icValidateCriticalError);
4043 if (m_nInput!=nInput) {
4044 sReport += icValidateCriticalErrorMsg;
4045 sReport += sSigName;
4046 ! sReport += " - Incorrect number of input channels.\n";
4047 rv = icMaxStatus(rv, icValidateCriticalError);
4052 if (m_nOutput!=nOutput) {
4053 sReport += icValidateCriticalErrorMsg;
4054 sReport += sSigName;
4055 ! sReport += " - Incorrect number of output channels.\r\n";
4056 rv = icMaxStatus(rv, icValidateCriticalError);
4060 if (m_nOutput!=nOutput) {
4061 sReport += icValidateCriticalErrorMsg;
4062 sReport += sSigName;
4063 ! sReport += " - Incorrect number of output channels.\n";
4064 rv = icMaxStatus(rv, icValidateCriticalError);
4069 if (m_nInput!=nInput) {
4070 sReport += icValidateCriticalErrorMsg;
4071 sReport += sSigName;
4072 ! sReport += " - Incorrect number of input channels.\r\n";
4073 rv = icMaxStatus(rv, icValidateCriticalError);
4077 if (m_nInput!=nInput) {
4078 sReport += icValidateCriticalErrorMsg;
4079 sReport += sSigName;
4080 ! sReport += " - Incorrect number of input channels.\n";
4081 rv = icMaxStatus(rv, icValidateCriticalError);
4086 if (m_nOutput!=nOutput) {
4087 sReport += icValidateCriticalErrorMsg;
4088 sReport += sSigName;
4089 ! sReport += " - Incorrect number of output channels.\r\n";
4090 rv = icMaxStatus(rv, icValidateCriticalError);
4094 if (m_nOutput!=nOutput) {
4095 sReport += icValidateCriticalErrorMsg;
4096 sReport += sSigName;
4097 ! sReport += " - Incorrect number of output channels.\n";
4098 rv = icMaxStatus(rv, icValidateCriticalError);
4103 if (m_nInput!=nInput) {
4104 sReport += icValidateCriticalErrorMsg;
4105 sReport += sSigName;
4106 ! sReport += " - Incorrect number of input channels.\r\n";
4107 rv = icMaxStatus(rv, icValidateCriticalError);
4111 if (m_nInput!=nInput) {
4112 sReport += icValidateCriticalErrorMsg;
4113 sReport += sSigName;
4114 ! sReport += " - Incorrect number of input channels.\n";
4115 rv = icMaxStatus(rv, icValidateCriticalError);
4120 if (m_nOutput!=nOutput) {
4121 sReport += icValidateCriticalErrorMsg;
4122 sReport += sSigName;
4123 ! sReport += " - Incorrect number of output channels.\r\n";
4124 rv = icMaxStatus(rv, icValidateCriticalError);
4128 if (m_nOutput!=nOutput) {
4129 sReport += icValidateCriticalErrorMsg;
4130 sReport += sSigName;
4131 ! sReport += " - Incorrect number of output channels.\n";
4132 rv = icMaxStatus(rv, icValidateCriticalError);
4138 sReport += icValidateCriticalErrorMsg;
4139 sReport += sSigName;
4140 ! sReport += " - CLUT must be present.\r\n";
4141 rv = icMaxStatus(rv, icValidateCriticalError);
4146 sReport += icValidateCriticalErrorMsg;
4147 sReport += sSigName;
4148 ! sReport += " - CLUT must be present.\n";
4149 rv = icMaxStatus(rv, icValidateCriticalError);
4155 sReport += icValidateCriticalErrorMsg;
4156 sReport += sSigName;
4157 ! sReport += " - Incorrect number of B-curves.\r\n";
4158 rv = icMaxStatus(rv, icValidateCriticalError);
4163 sReport += icValidateCriticalErrorMsg;
4164 sReport += sSigName;
4165 ! sReport += " - Incorrect number of B-curves.\n";
4166 rv = icMaxStatus(rv, icValidateCriticalError);
4172 sReport += icValidateCriticalErrorMsg;
4173 sReport += sSigName;
4174 ! sReport += " - Incorrect number of M-curves.\r\n";
4175 rv = icMaxStatus(rv, icValidateCriticalError);
4180 sReport += icValidateCriticalErrorMsg;
4181 sReport += sSigName;
4182 ! sReport += " - Incorrect number of M-curves.\n";
4183 rv = icMaxStatus(rv, icValidateCriticalError);
4189 sReport += icValidateNonCompliantMsg;
4190 sReport += sSigName;
4191 ! sReport += " - CLUT must be present if using A-curves.\r\n";
4193 rv = icMaxStatus(rv, icValidateNonCompliant);
4197 sReport += icValidateNonCompliantMsg;
4198 sReport += sSigName;
4199 ! sReport += " - CLUT must be present if using A-curves.\n";
4201 rv = icMaxStatus(rv, icValidateNonCompliant);
4206 sReport += icValidateCriticalErrorMsg;
4207 sReport += sSigName;
4208 ! sReport += " - Incorrect number of A-curves.\r\n";
4209 rv = icMaxStatus(rv, icValidateCriticalError);
4214 sReport += icValidateCriticalErrorMsg;
4215 sReport += sSigName;
4216 ! sReport += " - Incorrect number of A-curves.\n";
4217 rv = icMaxStatus(rv, icValidateCriticalError);
4223 sReport += icValidateWarningMsg;
4224 sReport += sSigName;
4225 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
4226 rv = icMaxStatus(rv, icValidateCriticalError);
4231 sReport += icValidateWarningMsg;
4232 sReport += sSigName;
4233 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
4234 rv = icMaxStatus(rv, icValidateCriticalError);
4239 if (m_nOutput!=nOutput) {
4240 sReport += icValidateCriticalErrorMsg;
4241 sReport += sSigName;
4242 ! sReport += " - Incorrect number of output channels.\r\n";
4243 rv = icMaxStatus(rv, icValidateCriticalError);
4247 if (m_nOutput!=nOutput) {
4248 sReport += icValidateCriticalErrorMsg;
4249 sReport += sSigName;
4250 ! sReport += " - Incorrect number of output channels.\n";
4251 rv = icMaxStatus(rv, icValidateCriticalError);
4257 sReport += icValidateCriticalErrorMsg;
4258 sReport += sSigName;
4259 ! sReport += " - Incorrect number of B-curves.\r\n";
4260 rv = icMaxStatus(rv, icValidateCriticalError);
4265 sReport += icValidateCriticalErrorMsg;
4266 sReport += sSigName;
4267 ! sReport += " - Incorrect number of B-curves.\n";
4268 rv = icMaxStatus(rv, icValidateCriticalError);
4274 sReport += icValidateCriticalErrorMsg;
4275 sReport += sSigName;
4276 ! sReport += " - Incorrect number of M-curves.\r\n";
4277 rv = icMaxStatus(rv, icValidateCriticalError);
4282 sReport += icValidateCriticalErrorMsg;
4283 sReport += sSigName;
4284 ! sReport += " - Incorrect number of M-curves.\n";
4285 rv = icMaxStatus(rv, icValidateCriticalError);
4291 sReport += icValidateNonCompliantMsg;
4292 sReport += sSigName;
4293 ! sReport += " - CLUT must be present if using A-curves.\r\n";
4295 rv = icMaxStatus(rv, icValidateNonCompliant);
4299 sReport += icValidateNonCompliantMsg;
4300 sReport += sSigName;
4301 ! sReport += " - CLUT must be present if using A-curves.\n";
4303 rv = icMaxStatus(rv, icValidateNonCompliant);
4308 sReport += icValidateCriticalErrorMsg;
4309 sReport += sSigName;
4310 ! sReport += " - Incorrect number of A-curves.\r\n";
4311 rv = icMaxStatus(rv, icValidateCriticalError);
4316 sReport += icValidateCriticalErrorMsg;
4317 sReport += sSigName;
4318 ! sReport += " - Incorrect number of A-curves.\n";
4319 rv = icMaxStatus(rv, icValidateCriticalError);
4324 if (pTagCurve->GetSize()==1) {
4325 sReport += icValidateCriticalErrorMsg;
4326 sReport += sSigName;
4327 ! sReport += " - lut8Tags do not support single entry gamma curves.\r\n";
4328 rv = icMaxStatus(rv, icValidateCriticalError);
4332 if (pTagCurve->GetSize()==1) {
4333 sReport += icValidateCriticalErrorMsg;
4334 sReport += sSigName;
4335 ! sReport += " - lut8Tags do not support single entry gamma curves.\n";
4336 rv = icMaxStatus(rv, icValidateCriticalError);
4342 sReport += icValidateCriticalErrorMsg;
4343 sReport += sSigName;
4344 ! sReport += " - Incorrect number of B-curves.\r\n";
4345 rv = icMaxStatus(rv, icValidateCriticalError);
4350 sReport += icValidateCriticalErrorMsg;
4351 sReport += sSigName;
4352 ! sReport += " - Incorrect number of B-curves.\n";
4353 rv = icMaxStatus(rv, icValidateCriticalError);
4358 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4359 sReport += icValidateWarningMsg;
4360 sReport += sSigName;
4361 ! sReport += " - Matrix must be identity.\r\n";
4362 rv = icMaxStatus(rv, icValidateWarning);
4366 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4367 sReport += icValidateWarningMsg;
4368 sReport += sSigName;
4369 ! sReport += " - Matrix must be identity.\n";
4370 rv = icMaxStatus(rv, icValidateWarning);
4375 if (pTagCurve->GetSize()==1) {
4376 sReport += icValidateCriticalErrorMsg;
4377 sReport += sSigName;
4378 ! sReport += " - lut8Tags do not support single entry gamma curves.\r\n";
4379 rv = icMaxStatus(rv, icValidateCriticalError);
4383 if (pTagCurve->GetSize()==1) {
4384 sReport += icValidateCriticalErrorMsg;
4385 sReport += sSigName;
4386 ! sReport += " - lut8Tags do not support single entry gamma curves.\n";
4387 rv = icMaxStatus(rv, icValidateCriticalError);
4393 sReport += icValidateCriticalErrorMsg;
4394 sReport += sSigName;
4395 ! sReport += " - Incorrect number of A-curves.\r\n";
4396 rv = icMaxStatus(rv, icValidateCriticalError);
4401 sReport += icValidateCriticalErrorMsg;
4402 sReport += sSigName;
4403 ! sReport += " - Incorrect number of A-curves.\n";
4404 rv = icMaxStatus(rv, icValidateCriticalError);
4409 if (pTagCurve->GetSize()==1) {
4410 sReport += icValidateCriticalErrorMsg;
4411 sReport += sSigName;
4412 ! sReport += " - lut16Tags do not support single entry gamma curves.\r\n";
4413 rv = icMaxStatus(rv, icValidateCriticalError);
4417 if (pTagCurve->GetSize()==1) {
4418 sReport += icValidateCriticalErrorMsg;
4419 sReport += sSigName;
4420 ! sReport += " - lut16Tags do not support single entry gamma curves.\n";
4421 rv = icMaxStatus(rv, icValidateCriticalError);
4427 sReport += icValidateCriticalErrorMsg;
4428 sReport += sSigName;
4429 ! sReport += " - Incorrect number of B-curves.\r\n";
4430 rv = icMaxStatus(rv, icValidateCriticalError);
4435 sReport += icValidateCriticalErrorMsg;
4436 sReport += sSigName;
4437 ! sReport += " - Incorrect number of B-curves.\n";
4438 rv = icMaxStatus(rv, icValidateCriticalError);
4443 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4444 sReport += icValidateWarningMsg;
4445 sReport += sSigName;
4446 ! sReport += " - Matrix must be identity.\r\n";
4447 rv = icMaxStatus(rv, icValidateWarning);
4451 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4452 sReport += icValidateWarningMsg;
4453 sReport += sSigName;
4454 ! sReport += " - Matrix must be identity.\n";
4455 rv = icMaxStatus(rv, icValidateWarning);
4460 if (pTagCurve->GetSize()==1) {
4461 sReport += icValidateCriticalErrorMsg;
4462 sReport += sSigName;
4463 ! sReport += " - lut16Tags do not support single entry gamma curves.\r\n";
4464 rv = icMaxStatus(rv, icValidateCriticalError);
4468 if (pTagCurve->GetSize()==1) {
4469 sReport += icValidateCriticalErrorMsg;
4470 sReport += sSigName;
4471 ! sReport += " - lut16Tags do not support single entry gamma curves.\n";
4472 rv = icMaxStatus(rv, icValidateCriticalError);
4478 sReport += icValidateCriticalErrorMsg;
4479 sReport += sSigName;
4480 ! sReport += " - Incorrect number of A-curves.\r\n";
4481 rv = icMaxStatus(rv, icValidateCriticalError);
4486 sReport += icValidateCriticalErrorMsg;
4487 sReport += sSigName;
4488 ! sReport += " - Incorrect number of A-curves.\n";
4489 rv = icMaxStatus(rv, icValidateCriticalError);
4492 *** misc/SampleICC-1.3.2/IccProfLib/IccTagMPE.cpp Mon Aug 20 22:05:00 2007
4493 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagMPE.cpp Fri Jan 25 14:23:09 2008
4496 icGetSig(sigbuf, m_sig), m_nSize);
4497 sDescription += buf;
4499 ! sDescription += "\r\n\r\nData Follows:\r\n";
4501 icMemDump(sDescription, m_pData, m_nSize);
4504 icGetSig(sigbuf, m_sig), m_nSize);
4505 sDescription += buf;
4507 ! sDescription += "\n\nData Follows:\n";
4509 icMemDump(sDescription, m_pData, m_nSize);
4513 sReport += " - Contains unknown processing element type (";
4514 icGetSig(buf, m_sig, true);
4516 ! sReport += ").\r\n";
4518 return icValidateCriticalError;
4521 sReport += " - Contains unknown processing element type (";
4522 icGetSig(buf, m_sig, true);
4524 ! sReport += ").\n";
4526 return icValidateCriticalError;
4530 sReport += " - Element ";
4531 sSigName = Info.GetSigName(GetType());
4532 sReport += sSigName;
4533 ! sReport += " - Reserved Value must be zero.\r\n";
4535 rv = icValidateNonCompliant;
4538 sReport += " - Element ";
4539 sSigName = Info.GetSigName(GetType());
4540 sReport += sSigName;
4541 ! sReport += " - Reserved Value must be zero.\n";
4543 rv = icValidateNonCompliant;
4550 ! sprintf(buf, "BEGIN MULTI_PROCESS_ELEMENT_TAG %d %d\r\n", m_nInputChannels, m_nOutputChannels);
4551 sDescription += buf;
4552 ! sDescription += "\r\n";
4554 CIccMultiProcessElementList::iterator i;
4557 for (j=0, i=m_list->begin(); i!=m_list->end(); j++, i++) {
4558 ! sprintf(buf, "PROCESS_ELEMENT #%d\r\n", j+1);
4559 sDescription += buf;
4560 i->ptr->Describe(sDescription);
4561 ! sDescription += "\r\n";
4569 ! sprintf(buf, "BEGIN MULTI_PROCESS_ELEMENT_TAG %d %d\n", m_nInputChannels, m_nOutputChannels);
4570 sDescription += buf;
4571 ! sDescription += "\n";
4573 CIccMultiProcessElementList::iterator i;
4576 for (j=0, i=m_list->begin(); i!=m_list->end(); j++, i++) {
4577 ! sprintf(buf, "PROCESS_ELEMENT #%d\n", j+1);
4578 sDescription += buf;
4579 i->ptr->Describe(sDescription);
4580 ! sDescription += "\n";
4586 if (m_nInputChannels != m_nOutputChannels) {
4587 sReport += icValidateCriticalErrorMsg;
4588 sReport += sSigName;
4589 ! sReport += " No processing elements and input and output channels do not match!\r\n";
4590 return icValidateCriticalError;
4593 sReport += icValidateWarningMsg;
4594 sReport += sSigName;
4595 ! sReport += " No processing elements.\r\n";
4596 return icValidateWarning;
4600 if (m_nInputChannels != m_nOutputChannels) {
4601 sReport += icValidateCriticalErrorMsg;
4602 sReport += sSigName;
4603 ! sReport += " No processing elements and input and output channels do not match!\n";
4604 return icValidateCriticalError;
4607 sReport += icValidateWarningMsg;
4608 sReport += sSigName;
4609 ! sReport += " No processing elements.\n";
4610 return icValidateWarning;
4615 if (i->ptr->NumInputChannels() != m_nInputChannels) {
4616 sReport += icValidateCriticalErrorMsg;
4617 sReport += sSigName;
4618 ! sReport += " Mis-matching number of input channels!\r\n";
4619 return icValidateCriticalError;
4623 if (i->ptr->NumInputChannels() != m_nInputChannels) {
4624 sReport += icValidateCriticalErrorMsg;
4625 sReport += sSigName;
4626 ! sReport += " Mis-matching number of input channels!\n";
4627 return icValidateCriticalError;
4633 sReport += i->ptr->GetClassName();
4635 ! sReport += " Mis-matching number of channels!\r\n";
4636 return icValidateCriticalError;
4641 sReport += i->ptr->GetClassName();
4643 ! sReport += " Mis-matching number of channels!\n";
4644 return icValidateCriticalError;
4649 if (last && last->NumOutputChannels() != m_nOutputChannels) {
4650 sReport += icValidateCriticalErrorMsg;
4651 sReport += sSigName;
4652 ! sReport += " Mis-matching number of output channels!\r\n";
4653 return icValidateCriticalError;
4657 if (last && last->NumOutputChannels() != m_nOutputChannels) {
4658 sReport += icValidateCriticalErrorMsg;
4659 sReport += sSigName;
4660 ! sReport += " Mis-matching number of output channels!\n";
4661 return icValidateCriticalError;
4664 *** misc/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.cpp Mon Aug 20 22:05:00 2007
4665 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.cpp Fri Jan 25 14:23:09 2008
4671 ! sDescription += "ProfileID:\r\n";
4679 ! sDescription += "ProfileID:\n";
4685 sprintf(buf, "%2x", m_profileID.ID8[i]);
4686 sDescription += buf;
4688 ! sDescription += "\r\n";
4690 ! sDescription += "Description:\r\n";
4691 m_desc.Describe(sDescription);
4693 ! sDescription += "\r\n";
4698 sprintf(buf, "%2x", m_profileID.ID8[i]);
4699 sDescription += buf;
4701 ! sDescription += "\n";
4703 ! sDescription += "Description:\n";
4704 m_desc.Describe(sDescription);
4706 ! sDescription += "\n";
4715 ! sprintf(buf, "BEGIN ProfileSequenceIdentification_TAG\r\n");
4716 sDescription += buf;
4717 ! sDescription += "\r\n";
4720 CIccProfileIdDescList::iterator j;
4721 for (i=0, j=m_list->begin(); j!=m_list->end(); i++, j++) {
4722 ! sprintf(buf, "ProfileDescription_%d:\r\n", i+1);
4723 sDescription += buf;
4724 j->Describe(sDescription);
4727 ! sprintf(buf, "END ProfileSequenceIdentification_TAG\r\n");
4728 sDescription += buf;
4729 ! sDescription += "\r\n";
4737 ! sprintf(buf, "BEGIN ProfileSequenceIdentification_TAG\n");
4738 sDescription += buf;
4739 ! sDescription += "\n";
4742 CIccProfileIdDescList::iterator j;
4743 for (i=0, j=m_list->begin(); j!=m_list->end(); i++, j++) {
4744 ! sprintf(buf, "ProfileDescription_%d:\n", i+1);
4745 sDescription += buf;
4746 j->Describe(sDescription);
4749 ! sprintf(buf, "END ProfileSequenceIdentification_TAG\n");
4750 sDescription += buf;
4751 ! sDescription += "\n";
4755 *** misc/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.h Mon Aug 20 22:05:00 2007
4756 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.h Fri Jan 25 14:23:09 2008
4762 ! #endif //_ICCTAGPROFSEQID_H
4767 ! #endif //_ICCTAGPROFSEQID_H
4768 *** misc/SampleICC-1.3.2/IccProfLib/IccUtil.cpp Mon Aug 20 22:05:00 2007
4769 --- misc/build/SampleICC-1.3.2/IccProfLib/IccUtil.cpp Fri Jan 25 14:23:09 2008
4772 #include "IccUtil.h"
4773 #include "IccTagFactory.h"
4775 ! #include <memory.h>
4780 #include "IccUtil.h"
4781 #include "IccTagFactory.h"
4792 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[0]), icFtoD(pMatrix[1]), icFtoD(pMatrix[2]));
4794 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[3]), icFtoD(pMatrix[4]), icFtoD(pMatrix[5]));
4796 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[6]), icFtoD(pMatrix[7]), icFtoD(pMatrix[8]));
4804 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[0]), icFtoD(pMatrix[1]), icFtoD(pMatrix[2]));
4806 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[3]), icFtoD(pMatrix[4]), icFtoD(pMatrix[5]));
4808 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[6]), icFtoD(pMatrix[7]), icFtoD(pMatrix[8]));
4816 sReport += icValidateNonCompliantMsg;
4817 ! sReport += " - XYZNumber: Negative X value!\r\n";
4818 rv = icValidateNonCompliant;
4822 sReport += icValidateNonCompliantMsg;
4823 ! sReport += " - XYZNumber: Negative Y value!\r\n";
4824 rv = icMaxStatus(rv, icValidateNonCompliant);
4828 sReport += icValidateNonCompliantMsg;
4829 ! sReport += " - XYZNumber: Negative Z value!\r\n";
4830 rv = icMaxStatus(rv, icValidateNonCompliant);
4836 sReport += icValidateNonCompliantMsg;
4837 ! sReport += " - XYZNumber: Negative X value!\n";
4838 rv = icValidateNonCompliant;
4842 sReport += icValidateNonCompliantMsg;
4843 ! sReport += " - XYZNumber: Negative Y value!\n";
4844 rv = icMaxStatus(rv, icValidateNonCompliant);
4848 sReport += icValidateNonCompliantMsg;
4849 ! sReport += " - XYZNumber: Negative Z value!\n";
4850 rv = icMaxStatus(rv, icValidateNonCompliant);
4856 if (dateTime.year<1992) {
4857 sReport += icValidateWarningMsg;
4858 ! sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
4860 rv = icValidateWarning;
4864 if (dateTime.year<1992) {
4865 sReport += icValidateWarningMsg;
4866 ! sprintf(buf," - %u: Invalid year!\n",dateTime.year);
4868 rv = icValidateWarning;
4872 if (newtime->tm_mon==11 && newtime->tm_mday==31) {
4873 if (dateTime.year>(year+1)) {
4874 sReport += icValidateWarningMsg;
4875 ! sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
4877 rv = icMaxStatus(rv, icValidateWarning);
4880 if (newtime->tm_mon==11 && newtime->tm_mday==31) {
4881 if (dateTime.year>(year+1)) {
4882 sReport += icValidateWarningMsg;
4883 ! sprintf(buf," - %u: Invalid year!\n",dateTime.year);
4885 rv = icMaxStatus(rv, icValidateWarning);
4890 if (dateTime.year>year) {
4891 sReport += icValidateWarningMsg;
4892 ! sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
4894 rv = icMaxStatus(rv, icValidateWarning);
4898 if (dateTime.year>year) {
4899 sReport += icValidateWarningMsg;
4900 ! sprintf(buf," - %u: Invalid year!\n",dateTime.year);
4902 rv = icMaxStatus(rv, icValidateWarning);
4907 if (dateTime.month<1 || dateTime.month>12) {
4908 sReport += icValidateWarningMsg;
4909 ! sprintf(buf," - %u: Invalid month!\r\n",dateTime.month);
4911 rv = icMaxStatus(rv, icValidateWarning);
4915 if (dateTime.month<1 || dateTime.month>12) {
4916 sReport += icValidateWarningMsg;
4917 ! sprintf(buf," - %u: Invalid month!\n",dateTime.month);
4919 rv = icMaxStatus(rv, icValidateWarning);
4924 if (dateTime.day<1 || dateTime.day>31) {
4925 sReport += icValidateWarningMsg;
4926 ! sprintf(buf," - %u: Invalid day!\r\n",dateTime.day);
4928 rv = icMaxStatus(rv, icValidateWarning);
4932 if (dateTime.day<1 || dateTime.day>31) {
4933 sReport += icValidateWarningMsg;
4934 ! sprintf(buf," - %u: Invalid day!\n",dateTime.day);
4936 rv = icMaxStatus(rv, icValidateWarning);
4940 if (dateTime.month==2) {
4941 if (dateTime.day>29) {
4942 sReport += icValidateWarningMsg;
4943 ! sprintf(buf," - %u: Invalid day for February!\r\n",dateTime.day);
4945 rv = icMaxStatus(rv, icValidateWarning);
4948 if (dateTime.month==2) {
4949 if (dateTime.day>29) {
4950 sReport += icValidateWarningMsg;
4951 ! sprintf(buf," - %u: Invalid day for February!\n",dateTime.day);
4953 rv = icMaxStatus(rv, icValidateWarning);
4957 if (dateTime.day==29) {
4958 if ((dateTime.year%4)!=0) {
4959 sReport += icValidateWarningMsg;
4960 ! sprintf(buf," - %u: Invalid day for February, year is not a leap year(%u)!\r\n",dateTime.day, dateTime.year);
4962 rv = icMaxStatus(rv, icValidateWarning);
4965 if (dateTime.day==29) {
4966 if ((dateTime.year%4)!=0) {
4967 sReport += icValidateWarningMsg;
4968 ! sprintf(buf," - %u: Invalid day for February, year is not a leap year(%u)!\n",dateTime.day, dateTime.year);
4970 rv = icMaxStatus(rv, icValidateWarning);
4975 if (dateTime.hours>23) {
4976 sReport += icValidateWarningMsg;
4977 ! sprintf(buf," - %u: Invalid hour!\r\n",dateTime.hours);
4979 rv = icMaxStatus(rv, icValidateWarning);
4983 if (dateTime.hours>23) {
4984 sReport += icValidateWarningMsg;
4985 ! sprintf(buf," - %u: Invalid hour!\n",dateTime.hours);
4987 rv = icMaxStatus(rv, icValidateWarning);
4992 if (dateTime.minutes>59) {
4993 sReport += icValidateWarningMsg;
4994 ! sprintf(buf," - %u: Invalid minutes!\r\n",dateTime.minutes);
4996 rv = icMaxStatus(rv, icValidateWarning);
5000 if (dateTime.minutes>59) {
5001 sReport += icValidateWarningMsg;
5002 ! sprintf(buf," - %u: Invalid minutes!\n",dateTime.minutes);
5004 rv = icMaxStatus(rv, icValidateWarning);
5009 if (dateTime.seconds>59) {
5010 sReport += icValidateWarningMsg;
5011 ! sprintf(buf," - %u: Invalid seconds!\r\n",dateTime.hours);
5013 rv = icMaxStatus(rv, icValidateWarning);
5017 if (dateTime.seconds>59) {
5018 sReport += icValidateWarningMsg;
5019 ! sprintf(buf," - %u: Invalid seconds!\n",dateTime.hours);
5021 rv = icMaxStatus(rv, icValidateWarning);
5023 *** misc/SampleICC-1.3.2/IccProfLib/icProfileHeader.h Mon Aug 20 22:05:00 2007
5024 --- misc/build/SampleICC-1.3.2/IccProfLib/icProfileHeader.h Fri Jan 25 14:23:09 2008
5028 icFlare0 = 0x00000000, /* 0% flare */
5029 icFlare100 = 0x00000001, /* 100% flare */
5030 } icMeasurementFlare;
5032 /** Convenience Enum Definition - Not defined in ICC specification*/
5033 ! #define icMaxEnumFlare ((icMeasurementFlare) 0xFFFFFFFF)
5034 #define icMaxFlare ((icMeasurementFlare) 0xFFFFFFFF) /* as defined by earlier versions */
5039 icFlare0 = 0x00000000, /* 0% flare */
5040 icFlare100 = 0x00000001, /* 100% flare */
5041 + icMaxEnumFlare = 0xFFFFFFFF
5042 } icMeasurementFlare;
5044 /** Convenience Enum Definition - Not defined in ICC specification*/
5045 ! /*#define icMaxEnumFlare ((icMeasurementFlare) 0xFFFFFFFF)*/
5046 #define icMaxFlare ((icMeasurementFlare) 0xFFFFFFFF) /* as defined by earlier versions */
5049 *** misc/SampleICC-1.3.2/Tools/CmdLine/Makefile.in Mon Aug 20 22:10:42 2007
5050 --- misc/build/SampleICC-1.3.2/Tools/CmdLine/Makefile.in Fri Jan 25 14:23:09 2008
5053 am__quote = @am__quote@
5054 install_sh = @install_sh@
5056 ! SUBDIRS = IccApplyNamedCmm \
5057 ! @SICC_ICC_APPLY_PROFILES@ \
5060 IccStripUnknownTags \
5064 ! DIST_SUBDIRS = IccApplyNamedCmm \
5065 ! IccApplyProfiles \
5068 IccStripUnknownTags \
5071 am__quote = @am__quote@
5072 install_sh = @install_sh@
5074 ! SUBDIRS = IccDumpProfile \
5076 IccStripUnknownTags \
5080 ! DIST_SUBDIRS = IccDumpProfile \
5082 IccStripUnknownTags \
5084 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp 2007-08-20 22:04:53.000000000 +0200
5085 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp 2008-01-31 13:53:16.000000000 +0100
5090 //////////////////////////////////////////////////////////////////////
5092 + #include <stdlib.h>
5093 + #include <string.h>
5097 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h 2007-08-20 22:04:54.000000000 +0200
5098 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h 2008-01-31 13:54:51.000000000 +0100
5102 #ifndef __DEFINED_ICC_TOOL_EXCEPTION_H__
5103 #define __DEFINED_ICC_TOOL_EXCEPTION_H__
5105 + #include <string.h>
5106 #include <exception>
5109 *** misc/SampleICC-1.3.2/IccProfLib/IccCmm.cpp 2007-08-20 22:05:00.000000000 +0200
5110 --- misc/build/SampleICC-1.3.2/IccProfLib/IccCmm.cpp 2008-01-31 13:49:54.000000000 +0100
5114 #pragma warning( disable: 4786) //disable warning in <list.h>
5117 + #include <stdlib.h>
5118 + #include <string.h>
5122 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h 2007-08-20 22:04:53.000000000 +0200
5123 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h 2008-01-31 14:05:58.000000000 +0100
5128 #include <sys/types.h>
5129 #include <sys/stat.h>
5130 + #include <stdlib.h>
5133 typedef unsigned short mode_t;