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:24:00 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:24:00 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:24:00 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:24:00 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:24:00 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:49:56 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:25:33 2008
829 ! #include <memory.h>
841 *** misc/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp Mon Aug 20 22:05:00 2007
842 --- misc/build/SampleICC-1.3.2/IccProfLib/IccMpeACS.cpp Fri Jan 25 14:24:00 2008
848 ! sDescription += "ELEM_bACS\r\n";
850 ! sDescription += "ELEM_eACS\r\n";
852 icGetSig(sigBuf, m_signature);
853 sDescription += " Signature = ";
854 sDescription += sigBuf;
855 ! sDescription += "\r\n";
858 ! sDescription += "\r\nData Follows:\r\n";
860 icMemDump(sDescription, m_pData, m_nDataSize);
866 ! sDescription += "ELEM_bACS\n";
868 ! sDescription += "ELEM_eACS\n";
870 icGetSig(sigBuf, m_signature);
871 sDescription += " Signature = ";
872 sDescription += sigBuf;
873 ! sDescription += "\n";
876 ! sDescription += "\nData Follows:\n";
878 icMemDump(sDescription, m_pData, m_nDataSize);
880 *** misc/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp Mon Aug 20 22:05:00 2007
881 --- misc/build/SampleICC-1.3.2/IccProfLib/IccMpeBasic.cpp Fri Jan 25 14:24:00 2008
884 sprintf(buf, "%.8f", m_endPoint);
887 ! sprintf(buf, "]\r\nFunctionType: %04Xh\r\n", m_nFunctionType);
890 switch(m_nFunctionType) {
892 if (m_params[1]==0.0 && m_params[2]==0.0)
893 ! sprintf(buf, "Y = %.8f\r\n\r\n", m_params[3]);
894 else if (m_params[0]==1.0 && m_params[1]==1.0 && m_params[2]==0.0 && m_params[3]==0.0)
895 ! sprintf(buf, "Y = X\r\n\r\n");
896 else if (m_params[0]==1.0 && m_params[2]==0.0)
897 ! sprintf(buf, "Y = %.8f * X + %.8f\r\n\r\n",
898 m_params[1], m_params[3]);
900 ! sprintf(buf, "Y = (%.8f * X + %.8f)^%.4f + %.8f\r\n\r\n",
901 m_params[1], m_params[2], m_params[0], m_params[3]);
906 ! sprintf(buf, "Y = %.8f * log (%.8f * (X ^ %.8f) + %.8f) + %.8f\r\n\r\n",
907 m_params[1], m_params[2], m_params[0], m_params[3], m_params[4]);
912 ! sprintf(buf, "Y = %.8f * (%.8f ^ (%.8f * X + %.8f)) + %.8f\r\n\r\n",
913 m_params[0], m_params[1], m_params[2], m_params[3], m_params[4]);
917 sprintf(buf, "%.8f", m_endPoint);
920 ! sprintf(buf, "]\nFunctionType: %04Xh\n", m_nFunctionType);
923 switch(m_nFunctionType) {
925 if (m_params[1]==0.0 && m_params[2]==0.0)
926 ! sprintf(buf, "Y = %.8f\n\n", m_params[3]);
927 else if (m_params[0]==1.0 && m_params[1]==1.0 && m_params[2]==0.0 && m_params[3]==0.0)
928 ! sprintf(buf, "Y = X\n\n");
929 else if (m_params[0]==1.0 && m_params[2]==0.0)
930 ! sprintf(buf, "Y = %.8f * X + %.8f\n\n",
931 m_params[1], m_params[3]);
933 ! sprintf(buf, "Y = (%.8f * X + %.8f)^%.4f + %.8f\n\n",
934 m_params[1], m_params[2], m_params[0], m_params[3]);
939 ! sprintf(buf, "Y = %.8f * log (%.8f * (X ^ %.8f) + %.8f) + %.8f\n\n",
940 m_params[1], m_params[2], m_params[0], m_params[3], m_params[4]);
945 ! sprintf(buf, "Y = %.8f * (%.8f ^ (%.8f * X + %.8f)) + %.8f\n\n",
946 m_params[0], m_params[1], m_params[2], m_params[3], m_params[4]);
954 ! sprintf(buf, "Unknown Function with %d parameters:\r\n\r\n", m_nParameters);
957 for (i=0; i<m_nParameters; i++) {
958 ! sprintf(buf, "Param[%d] = %.8lf\r\n\r\n", i, m_params[i]);
966 ! sprintf(buf, "Unknown Function with %d parameters:\n\n", m_nParameters);
969 for (i=0; i<m_nParameters; i++) {
970 ! sprintf(buf, "Param[%d] = %.8lf\n\n", i, m_params[i]);
976 if (m_nReserved || m_nReserved2) {
977 sReport += icValidateWarningMsg;
979 ! sReport += " formula curve has non zero reserved data.\r\n";
980 rv = icValidateWarning;
984 if (m_nReserved || m_nReserved2) {
985 sReport += icValidateWarningMsg;
987 ! sReport += " formula curve has non zero reserved data.\n";
988 rv = icValidateWarning;
993 if (!m_params || m_nParameters<4) {
994 sReport += icValidateCriticalErrorMsg;
996 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
997 rv = icValidateCriticalError;
999 else if (m_nParameters > 4) {
1000 sReport += icValidateWarningMsg;
1001 sReport += sSigName;
1002 ! sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
1003 rv = icValidateWarning;
1007 if (!m_params || m_nParameters<4) {
1008 sReport += icValidateCriticalErrorMsg;
1009 sReport += sSigName;
1010 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
1011 rv = icValidateCriticalError;
1013 else if (m_nParameters > 4) {
1014 sReport += icValidateWarningMsg;
1015 sReport += sSigName;
1016 ! sReport += " formula curve has too many formulaCurveSegment parameters.\n";
1017 rv = icValidateWarning;
1022 if (!m_params || m_nParameters<5) {
1023 sReport += icValidateCriticalErrorMsg;
1024 sReport += sSigName;
1025 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
1026 rv = icValidateCriticalError;
1028 else if (m_nParameters > 5) {
1029 sReport += icValidateWarningMsg;
1030 sReport += sSigName;
1031 ! sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
1032 rv = icValidateWarning;
1036 if (!m_params || m_nParameters<5) {
1037 sReport += icValidateCriticalErrorMsg;
1038 sReport += sSigName;
1039 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
1040 rv = icValidateCriticalError;
1042 else if (m_nParameters > 5) {
1043 sReport += icValidateWarningMsg;
1044 sReport += sSigName;
1045 ! sReport += " formula curve has too many formulaCurveSegment parameters.\n";
1046 rv = icValidateWarning;
1051 if (!m_params || m_nParameters<5) {
1052 sReport += icValidateCriticalErrorMsg;
1053 sReport += sSigName;
1054 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\r\n";
1055 rv = icValidateCriticalError;
1057 else if (m_nParameters > 5) {
1058 sReport += icValidateWarningMsg;
1059 sReport += sSigName;
1060 ! sReport += " formula curve has too many formulaCurveSegment parameters.\r\n";
1061 rv = icValidateWarning;
1065 if (!m_params || m_nParameters<5) {
1066 sReport += icValidateCriticalErrorMsg;
1067 sReport += sSigName;
1068 ! sReport += " formula curve has Invalid formulaCurveSegment parameters.\n";
1069 rv = icValidateCriticalError;
1071 else if (m_nParameters > 5) {
1072 sReport += icValidateWarningMsg;
1073 sReport += sSigName;
1074 ! sReport += " formula curve has too many formulaCurveSegment parameters.\n";
1075 rv = icValidateWarning;
1081 sReport += icValidateCriticalErrorMsg;
1082 sReport += sSigName;
1083 ! sprintf(buf, " formula curve uses unknown formulaCurveSegment function type %d\r\n", m_nFunctionType);
1085 rv = icValidateCriticalError;
1089 sReport += icValidateCriticalErrorMsg;
1090 sReport += sSigName;
1091 ! sprintf(buf, " formula curve uses unknown formulaCurveSegment function type %d\n", m_nFunctionType);
1093 rv = icValidateCriticalError;
1097 sDescription += buf;
1100 ! sprintf(buf, "]\r\n");
1101 sDescription += buf;
1105 sDescription += buf;
1108 ! sprintf(buf, "]\n");
1109 sDescription += buf;
1114 sprintf(buf, "%.8f", m_endPoint);
1115 sDescription += buf;
1117 ! sprintf(buf, "]\r\n");
1118 sDescription += buf;
1119 ! sDescription += "IN OUT\r\n";
1124 sprintf(buf, "%.8f", m_endPoint);
1125 sDescription += buf;
1127 ! sprintf(buf, "]\n");
1128 sDescription += buf;
1129 ! sDescription += "IN OUT\n";
1135 icFloatNumber last = (icFloatNumber)(m_nCount-1);
1137 for (i=0; i<m_nCount; i++) {
1138 ! sprintf(buf, "%.8f %.8f\r\n", m_startPoint + (icFloatNumber)i*range/last, m_pSamples[i]);
1139 sDescription += buf;
1142 ! sDescription += "\r\n";
1147 icFloatNumber last = (icFloatNumber)(m_nCount-1);
1149 for (i=0; i<m_nCount; i++) {
1150 ! sprintf(buf, "%.8f %.8f\n", m_startPoint + (icFloatNumber)i*range/last, m_pSamples[i]);
1151 sDescription += buf;
1154 ! sDescription += "\n";
1161 sReport += icValidateWarningMsg;
1162 sReport += sSigName;
1163 ! sReport += " sampled curve has non zero reserved data.\r\n";
1164 rv = icValidateWarning;
1169 sReport += icValidateWarningMsg;
1170 sReport += sSigName;
1171 ! sReport += " sampled curve has non zero reserved data.\n";
1172 rv = icValidateWarning;
1178 sReport += icValidateCriticalErrorMsg;
1179 sReport += sSigName;
1180 ! sReport += " sampled curve has too few sample points.\r\n";
1181 rv = icValidateCriticalError;
1183 else if (m_endPoint-m_startPoint == 0.0) {
1184 sReport += icValidateWarningMsg;
1185 sReport += sSigName;
1186 ! sReport += " sampled curve has a range of zero.\r\n";
1187 rv = icMaxStatus(rv, icValidateWarning);
1192 sReport += icValidateCriticalErrorMsg;
1193 sReport += sSigName;
1194 ! sReport += " sampled curve has too few sample points.\n";
1195 rv = icValidateCriticalError;
1197 else if (m_endPoint-m_startPoint == 0.0) {
1198 sReport += icValidateWarningMsg;
1199 sReport += sSigName;
1200 ! sReport += " sampled curve has a range of zero.\n";
1201 rv = icMaxStatus(rv, icValidateWarning);
1207 CIccCurveSegmentList::iterator i;
1209 ! sDescription += "BEGIN_CURVE\r\n";
1210 for (i=m_list->begin(); i!=m_list->end(); i++) {
1211 (*i)->Describe(sDescription);
1215 CIccCurveSegmentList::iterator i;
1217 ! sDescription += "BEGIN_CURVE\n";
1218 for (i=m_list->begin(); i!=m_list->end(); i++) {
1219 (*i)->Describe(sDescription);
1223 if (m_nReserved1 || m_nReserved2) {
1224 sReport += icValidateWarningMsg;
1225 sReport += sSigName;
1226 ! sReport += " Segmented curve has non zero reserved data.\r\n";
1227 rv = icValidateWarning;
1231 if (m_nReserved1 || m_nReserved2) {
1232 sReport += icValidateWarningMsg;
1233 sReport += sSigName;
1234 ! sReport += " Segmented curve has non zero reserved data.\n";
1235 rv = icValidateWarning;
1240 if (m_list->size()==0) {
1241 sReport += icValidateCriticalErrorMsg;
1242 sReport += sSigName;
1243 ! sReport += " Has Empty CurveSegment!\r\n";
1244 return icValidateCriticalError;
1248 if (m_list->size()==0) {
1249 sReport += icValidateCriticalErrorMsg;
1250 sReport += sSigName;
1251 ! sReport += " Has Empty CurveSegment!\n";
1252 return icValidateCriticalError;
1260 ! sprintf(buf, "BEGIN_CURVE_SET %d\r\n", m_nInputChannels);
1261 sDescription += buf;
1263 for (i=0; i<m_nInputChannels; i++) {
1264 ! sprintf(buf, "Curve %d of %d\r\n", i+1, m_nInputChannels);
1265 sDescription += buf;
1267 m_curve[i]->Describe(sDescription);
1272 ! sprintf(buf, "BEGIN_CURVE_SET %d\n", m_nInputChannels);
1273 sDescription += buf;
1275 for (i=0; i<m_nInputChannels; i++) {
1276 ! sprintf(buf, "Curve %d of %d\n", i+1, m_nInputChannels);
1277 sDescription += buf;
1279 m_curve[i]->Describe(sDescription);
1282 sReport += " - Element ";
1283 sSigName = Info.GetSigName(GetType());
1284 sReport += sSigName;
1285 ! sReport += " Has Empty Curve Element(s)!\r\n";
1286 return icValidateCriticalError;
1290 sReport += " - Element ";
1291 sSigName = Info.GetSigName(GetType());
1292 sReport += sSigName;
1293 ! sReport += " Has Empty Curve Element(s)!\n";
1294 return icValidateCriticalError;
1300 icFloatNumber *data = m_pMatrix;
1302 ! sprintf(buf, "BEGIN_ELEM_MATRIX %d %d\r\n", m_nInputChannels, m_nOutputChannels);
1303 sDescription += buf;
1305 for (j=0; j<m_nOutputChannels; j++) {
1308 icFloatNumber *data = m_pMatrix;
1310 ! sprintf(buf, "BEGIN_ELEM_MATRIX %d %d\n", m_nInputChannels, m_nOutputChannels);
1311 sDescription += buf;
1313 for (j=0; j<m_nOutputChannels; j++) {
1316 sprintf(buf, "%12.8lf", data[i]);
1317 sDescription += buf;
1319 ! sprintf(buf, " + %12.8lf\r\n", m_pConstants[j]);
1320 sDescription += buf;
1324 sprintf(buf, "%12.8lf", data[i]);
1325 sDescription += buf;
1327 ! sprintf(buf, " + %12.8lf\n", m_pConstants[j]);
1328 sDescription += buf;
1333 sReport += " - Element ";
1334 sSigName = Info.GetSigName(GetType());
1335 sReport += sSigName;
1336 ! sReport += " Has Empty Matrix data!\r\n";
1337 return icValidateCriticalError;
1341 sReport += " - Element ";
1342 sSigName = Info.GetSigName(GetType());
1343 sReport += sSigName;
1344 ! sReport += " Has Empty Matrix data!\n";
1345 return icValidateCriticalError;
1350 sReport += " - Element ";
1351 sSigName = Info.GetSigName(GetType());
1352 sReport += sSigName;
1353 ! sReport += " Has No CLUT!\r\n";
1354 return icValidateCriticalError;
1358 sReport += " - Element ";
1359 sSigName = Info.GetSigName(GetType());
1360 sReport += sSigName;
1361 ! sReport += " Has No CLUT!\n";
1362 return icValidateCriticalError;
1365 *** misc/SampleICC-1.3.2/IccProfLib/IccProfile.cpp Mon Aug 20 22:05:00 2007
1366 --- misc/build/SampleICC-1.3.2/IccProfLib/IccProfile.cpp Fri Jan 25 14:24:00 2008
1370 if (!ReadBasic(pIO)) {
1371 sReport += icValidateCriticalErrorMsg;
1372 ! sReport += " - Unable to read profile!**\r\n\tProfile has invalid structure!\r\n";
1375 return icValidateCriticalError;
1378 if (!ReadBasic(pIO)) {
1379 sReport += icValidateCriticalErrorMsg;
1380 ! sReport += " - Unable to read profile!**\n\tProfile has invalid structure!\n";
1383 return icValidateCriticalError;
1386 // Check profile header
1387 if (!CheckFileSize(pIO)) {
1388 sReport += icValidateNonCompliantMsg;
1389 ! sReport += "Bad Header File Size\r\n";
1390 rv = icMaxStatus(rv, icValidateNonCompliant);
1394 // Check profile header
1395 if (!CheckFileSize(pIO)) {
1396 sReport += icValidateNonCompliantMsg;
1397 ! sReport += "Bad Header File Size\n";
1398 rv = icMaxStatus(rv, icValidateNonCompliant);
1403 CalcProfileID(pIO, &profileID);
1404 if (strncmp((char*)profileID.ID8, (char*)m_Header.profileID.ID8, 16) != 0) {
1405 sReport += icValidateNonCompliantMsg;
1406 ! sReport += "Bad Profile ID\r\n";
1408 rv = icMaxStatus(rv, icValidateNonCompliant);
1411 CalcProfileID(pIO, &profileID);
1412 if (strncmp((char*)profileID.ID8, (char*)m_Header.profileID.ID8, 16) != 0) {
1413 sReport += icValidateNonCompliantMsg;
1414 ! sReport += "Bad Profile ID\n";
1416 rv = icMaxStatus(rv, icValidateNonCompliant);
1420 sReport += icValidateCriticalErrorMsg;
1422 sReport += Info.GetTagSigName(i->TagInfo.sig);
1423 ! sReport += " - Tag has invalid structure!\r\n";
1425 rv = icMaxStatus(rv, icValidateCriticalError);
1428 sReport += icValidateCriticalErrorMsg;
1430 sReport += Info.GetTagSigName(i->TagInfo.sig);
1431 ! sReport += " - Tag has invalid structure!\n";
1433 rv = icMaxStatus(rv, icValidateCriticalError);
1439 sReport += icValidateCriticalErrorMsg;
1440 ! sprintf(buf, " - %s: Unknown profile class!\r\n", Info.GetProfileClassSigName(m_Header.deviceClass));
1442 rv = icMaxStatus(rv, icValidateCriticalError);
1447 sReport += icValidateCriticalErrorMsg;
1448 ! sprintf(buf, " - %s: Unknown profile class!\n", Info.GetProfileClassSigName(m_Header.deviceClass));
1450 rv = icMaxStatus(rv, icValidateCriticalError);
1455 if (!Info.IsValidSpace(m_Header.colorSpace)) {
1456 sReport += icValidateCriticalErrorMsg;
1457 ! sprintf(buf, " - %s: Unknown color space!\r\n", Info.GetColorSpaceSigName(m_Header.colorSpace));
1459 rv = icMaxStatus(rv, icValidateCriticalError);
1463 if (!Info.IsValidSpace(m_Header.colorSpace)) {
1464 sReport += icValidateCriticalErrorMsg;
1465 ! sprintf(buf, " - %s: Unknown color space!\n", Info.GetColorSpaceSigName(m_Header.colorSpace));
1467 rv = icMaxStatus(rv, icValidateCriticalError);
1471 if (m_Header.deviceClass==icSigLinkClass) {
1472 if (!Info.IsValidSpace(m_Header.pcs)) {
1473 sReport += icValidateCriticalErrorMsg;
1474 ! sprintf(buf, " - %s: Unknown pcs color space!\r\n", Info.GetColorSpaceSigName(m_Header.pcs));
1476 rv = icMaxStatus(rv, icValidateCriticalError);
1479 if (m_Header.deviceClass==icSigLinkClass) {
1480 if (!Info.IsValidSpace(m_Header.pcs)) {
1481 sReport += icValidateCriticalErrorMsg;
1482 ! sprintf(buf, " - %s: Unknown pcs color space!\n", Info.GetColorSpaceSigName(m_Header.pcs));
1484 rv = icMaxStatus(rv, icValidateCriticalError);
1489 if (m_Header.pcs!=icSigXYZData && m_Header.pcs!=icSigLabData) {
1490 sReport += icValidateCriticalErrorMsg;
1491 ! sprintf(buf, " - %s: Invalid pcs color space!\r\n", Info.GetColorSpaceSigName(m_Header.pcs));
1493 rv = icMaxStatus(rv, icValidateCriticalError);
1497 if (m_Header.pcs!=icSigXYZData && m_Header.pcs!=icSigLabData) {
1498 sReport += icValidateCriticalErrorMsg;
1499 ! sprintf(buf, " - %s: Invalid pcs color space!\n", Info.GetColorSpaceSigName(m_Header.pcs));
1501 rv = icMaxStatus(rv, icValidateCriticalError);
1507 sReport += icValidateWarningMsg;
1508 ! sprintf(buf, " - %s: Unknown platform signature.\r\n", Info.GetPlatformSigName(m_Header.platform));
1510 rv = icMaxStatus(rv, icValidateWarning);
1515 sReport += icValidateWarningMsg;
1516 ! sprintf(buf, " - %s: Unknown platform signature.\n", Info.GetPlatformSigName(m_Header.platform));
1518 rv = icMaxStatus(rv, icValidateWarning);
1524 sReport += icValidateWarningMsg;
1525 ! sprintf(buf, " - %s: Unregisterd CMM signature.\r\n", Info.GetCmmSigName((icCmmSignature)m_Header.cmmId));
1527 rv = icMaxStatus(rv, icValidateWarning);
1532 sReport += icValidateWarningMsg;
1533 ! sprintf(buf, " - %s: Unregisterd CMM signature.\n", Info.GetCmmSigName((icCmmSignature)m_Header.cmmId));
1535 rv = icMaxStatus(rv, icValidateWarning);
1541 sReport += icValidateCriticalErrorMsg;
1542 ! sprintf(buf, " - %s: Unknown rendering intent!\r\n", Info.GetRenderingIntentName((icRenderingIntent)m_Header.renderingIntent));
1544 rv = icMaxStatus(rv, icValidateCriticalError);
1549 sReport += icValidateCriticalErrorMsg;
1550 ! sprintf(buf, " - %s: Unknown rendering intent!\n", Info.GetRenderingIntentName((icRenderingIntent)m_Header.renderingIntent));
1552 rv = icMaxStatus(rv, icValidateCriticalError);
1556 icFloatNumber Z = icFtoD(m_Header.illuminant.Z);
1557 if (X<0.9640 || X>0.9644 || Y!=1.0 || Z<0.8247 || Z>0.8251) {
1558 sReport += icValidateNonCompliantMsg;
1559 ! sReport += " - Non D50 Illuminant XYZ values.\r\n";
1560 rv = icMaxStatus(rv, icValidateNonCompliant);
1564 icFloatNumber Z = icFtoD(m_Header.illuminant.Z);
1565 if (X<0.9640 || X>0.9644 || Y!=1.0 || Z<0.8247 || Z>0.8251) {
1566 sReport += icValidateNonCompliantMsg;
1567 ! sReport += " - Non D50 Illuminant XYZ values.\n";
1568 rv = icMaxStatus(rv, icValidateNonCompliant);
1575 sReport += icValidateNonCompliantMsg;
1576 ! sReport += " - Reserved value must be zero.\r\n";
1577 rv = icMaxStatus(rv, icValidateNonCompliant);
1583 sReport += icValidateNonCompliantMsg;
1584 ! sReport += " - Reserved value must be zero.\n";
1585 rv = icMaxStatus(rv, icValidateNonCompliant);
1591 sReport += icValidateWarningMsg;
1593 ! sReport += " - Tag exclusion test failed.\r\n";
1599 sReport += icValidateWarningMsg;
1601 ! sReport += " - Tag exclusion test failed.\n";
1608 sReport += icValidateWarningMsg;
1610 ! sReport += " - Tag exclusion test failed.\r\n";
1616 sReport += icValidateWarningMsg;
1618 ! sReport += " - Tag exclusion test failed.\n";
1625 sReport += icValidateWarningMsg;
1627 ! sReport += " - Tag exclusion test failed.\r\n";
1633 sReport += icValidateWarningMsg;
1635 ! sReport += " - Tag exclusion test failed.\n";
1641 if (!IsTypeValid(tagsig, typesig)) {
1642 sReport += icValidateNonCompliantMsg;
1644 ! sprintf(buf," - %s: Invalid tag type (Might be critical!).\r\n", Info.GetTagTypeSigName(typesig));
1646 rv = icMaxStatus(rv, icValidateNonCompliant);
1649 if (!IsTypeValid(tagsig, typesig)) {
1650 sReport += icValidateNonCompliantMsg;
1652 ! sprintf(buf," - %s: Invalid tag type (Might be critical!).\n", Info.GetTagTypeSigName(typesig));
1654 rv = icMaxStatus(rv, icValidateNonCompliant);
1659 if (m_Tags->size() <= 0) {
1660 sReport += icValidateCriticalErrorMsg;
1661 ! sReport += "No tags present.\r\n";
1662 return icValidateCriticalError;
1667 if (m_Tags->size() <= 0) {
1668 sReport += icValidateCriticalErrorMsg;
1669 ! sReport += "No tags present.\n";
1670 return icValidateCriticalError;
1675 if (!GetTag(icSigProfileDescriptionTag) ||
1676 !GetTag(icSigCopyrightTag)) {
1677 sReport += icValidateNonCompliantMsg;
1678 ! sReport += "Required tags missing.\r\n";
1679 rv = icMaxStatus(rv, icValidateNonCompliant);
1683 if (!GetTag(icSigProfileDescriptionTag) ||
1684 !GetTag(icSigCopyrightTag)) {
1685 sReport += icValidateNonCompliantMsg;
1686 ! sReport += "Required tags missing.\n";
1687 rv = icMaxStatus(rv, icValidateNonCompliant);
1692 if (sig != icSigLinkClass) {
1693 if (!GetTag(icSigMediaWhitePointTag)) {
1694 sReport += icValidateCriticalErrorMsg;
1695 ! sReport += "Media white point tag missing.\r\n";
1696 rv = icMaxStatus(rv, icValidateCriticalError);
1700 if (sig != icSigLinkClass) {
1701 if (!GetTag(icSigMediaWhitePointTag)) {
1702 sReport += icValidateCriticalErrorMsg;
1703 ! sReport += "Media white point tag missing.\n";
1704 rv = icMaxStatus(rv, icValidateCriticalError);
1709 if (m_Header.colorSpace == icSigGrayData) {
1710 if (!GetTag(icSigGrayTRCTag)) {
1711 sReport += icValidateCriticalErrorMsg;
1712 ! sReport += "Gray TRC tag missing.\r\n";
1713 rv = icMaxStatus(rv, icValidateCriticalError);
1717 if (m_Header.colorSpace == icSigGrayData) {
1718 if (!GetTag(icSigGrayTRCTag)) {
1719 sReport += icValidateCriticalErrorMsg;
1720 ! sReport += "Gray TRC tag missing.\n";
1721 rv = icMaxStatus(rv, icValidateCriticalError);
1726 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1727 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1728 sReport += icValidateCriticalErrorMsg;
1729 ! sReport += "Critical tag(s) missing.\r\n";
1730 rv = icMaxStatus(rv, icValidateCriticalError);
1734 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1735 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1736 sReport += icValidateCriticalErrorMsg;
1737 ! sReport += "Critical tag(s) missing.\n";
1738 rv = icMaxStatus(rv, icValidateCriticalError);
1743 if (m_Header.colorSpace == icSigGrayData) {
1744 if (!GetTag(icSigGrayTRCTag)) {
1745 sReport += icValidateCriticalErrorMsg;
1746 ! sReport += "Gray TRC tag missing.\r\n";
1747 rv = icMaxStatus(rv, icValidateCriticalError);
1751 if (m_Header.colorSpace == icSigGrayData) {
1752 if (!GetTag(icSigGrayTRCTag)) {
1753 sReport += icValidateCriticalErrorMsg;
1754 ! sReport += "Gray TRC tag missing.\n";
1755 rv = icMaxStatus(rv, icValidateCriticalError);
1760 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1761 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1762 sReport += icValidateCriticalErrorMsg;
1763 ! sReport += "Critical tag(s) missing.\r\n";
1764 rv = icMaxStatus(rv, icValidateCriticalError);
1768 !GetTag(icSigBlueMatrixColumnTag) || !GetTag(icSigRedTRCTag) ||
1769 !GetTag(icSigGreenTRCTag) || !GetTag(icSigBlueTRCTag)) {
1770 sReport += icValidateCriticalErrorMsg;
1771 ! sReport += "Critical tag(s) missing.\n";
1772 rv = icMaxStatus(rv, icValidateCriticalError);
1777 if (m_Header.colorSpace == icSigGrayData) {
1778 if (!GetTag(icSigGrayTRCTag)) {
1779 sReport += icValidateCriticalErrorMsg;
1780 ! sReport += "Gray TRC tag missing.\r\n";
1781 rv = icMaxStatus(rv, icValidateCriticalError);
1785 if (m_Header.colorSpace == icSigGrayData) {
1786 if (!GetTag(icSigGrayTRCTag)) {
1787 sReport += icValidateCriticalErrorMsg;
1788 ! sReport += "Gray TRC tag missing.\n";
1789 rv = icMaxStatus(rv, icValidateCriticalError);
1794 !GetTag(icSigAToB1Tag) || !GetTag(icSigBToA1Tag) ||
1795 !GetTag(icSigAToB2Tag) || !GetTag(icSigBToA2Tag)) {
1796 sReport += icValidateCriticalErrorMsg;
1797 ! sReport += "Critical tag(s) missing.\r\n";
1798 rv = icMaxStatus(rv, icValidateCriticalError);
1801 if (!GetTag(icSigGamutTag)) {
1802 sReport += icValidateNonCompliantMsg;
1803 ! sReport += "Gamut tag missing.\r\n";
1804 rv = icMaxStatus(rv, icValidateNonCompliant);
1808 !GetTag(icSigAToB1Tag) || !GetTag(icSigBToA1Tag) ||
1809 !GetTag(icSigAToB2Tag) || !GetTag(icSigBToA2Tag)) {
1810 sReport += icValidateCriticalErrorMsg;
1811 ! sReport += "Critical tag(s) missing.\n";
1812 rv = icMaxStatus(rv, icValidateCriticalError);
1815 if (!GetTag(icSigGamutTag)) {
1816 sReport += icValidateNonCompliantMsg;
1817 ! sReport += "Gamut tag missing.\n";
1818 rv = icMaxStatus(rv, icValidateNonCompliant);
1823 case icSig16colorData:
1824 if (!GetTag(icSigColorantTableTag)) {
1825 sReport += icValidateNonCompliantMsg;
1826 ! sReport += "xCLR output profile is missing colorantTableTag\r\n";
1827 rv = icMaxStatus(rv, icValidateNonCompliant);
1831 case icSig16colorData:
1832 if (!GetTag(icSigColorantTableTag)) {
1833 sReport += icValidateNonCompliantMsg;
1834 ! sReport += "xCLR output profile is missing colorantTableTag\n";
1835 rv = icMaxStatus(rv, icValidateNonCompliant);
1840 case icSigLinkClass:
1841 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigProfileSequenceDescTag)) {
1842 sReport += icValidateCriticalErrorMsg;
1843 ! sReport += "Critical tag(s) missing.\r\n";
1844 rv = icMaxStatus(rv, icValidateCriticalError);
1848 case icSigLinkClass:
1849 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigProfileSequenceDescTag)) {
1850 sReport += icValidateCriticalErrorMsg;
1851 ! sReport += "Critical tag(s) missing.\n";
1852 rv = icMaxStatus(rv, icValidateCriticalError);
1857 if (icIsSpaceCLR(m_Header.colorSpace)) {
1858 if (!GetTag(icSigColorantTableTag)) {
1859 sReport += icValidateNonCompliantMsg;
1860 ! sReport += "Required tag(s) missing.\r\n";
1861 rv = icMaxStatus(rv, icValidateNonCompliant);
1865 if (icIsSpaceCLR(m_Header.colorSpace)) {
1866 if (!GetTag(icSigColorantTableTag)) {
1867 sReport += icValidateNonCompliantMsg;
1868 ! sReport += "Required tag(s) missing.\n";
1869 rv = icMaxStatus(rv, icValidateNonCompliant);
1874 if (icIsSpaceCLR(m_Header.pcs)) {
1875 if (!GetTag(icSigColorantTableOutTag)) {
1876 sReport += icValidateNonCompliantMsg;
1877 ! sReport += "Required tag(s) missing.\r\n";
1878 rv = icMaxStatus(rv, icValidateNonCompliant);
1882 if (icIsSpaceCLR(m_Header.pcs)) {
1883 if (!GetTag(icSigColorantTableOutTag)) {
1884 sReport += icValidateNonCompliantMsg;
1885 ! sReport += "Required tag(s) missing.\n";
1886 rv = icMaxStatus(rv, icValidateNonCompliant);
1891 case icSigColorSpaceClass:
1892 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigBToA0Tag)) {
1893 sReport += icValidateCriticalErrorMsg;
1894 ! sReport += "Critical tag(s) missing.\r\n";
1895 rv = icMaxStatus(rv, icValidateCriticalError);
1899 case icSigColorSpaceClass:
1900 if (!GetTag(icSigAToB0Tag) || !GetTag(icSigBToA0Tag)) {
1901 sReport += icValidateCriticalErrorMsg;
1902 ! sReport += "Critical tag(s) missing.\n";
1903 rv = icMaxStatus(rv, icValidateCriticalError);
1908 case icSigAbstractClass:
1909 if (!GetTag(icSigAToB0Tag)) {
1910 sReport += icValidateCriticalErrorMsg;
1911 ! sReport += "Critical tag(s) missing.\r\n";
1912 rv = icMaxStatus(rv, icValidateCriticalError);
1916 case icSigAbstractClass:
1917 if (!GetTag(icSigAToB0Tag)) {
1918 sReport += icValidateCriticalErrorMsg;
1919 ! sReport += "Critical tag(s) missing.\n";
1920 rv = icMaxStatus(rv, icValidateCriticalError);
1925 case icSigNamedColorClass:
1926 if (!GetTag(icSigNamedColor2Tag)) {
1927 sReport += icValidateCriticalErrorMsg;
1928 ! sReport += "Critical tag(s) missing.\r\n";
1929 rv = icMaxStatus(rv, icValidateCriticalError);
1933 case icSigNamedColorClass:
1934 if (!GetTag(icSigNamedColor2Tag)) {
1935 sReport += icValidateCriticalErrorMsg;
1936 ! sReport += "Critical tag(s) missing.\n";
1937 rv = icMaxStatus(rv, icValidateCriticalError);
1944 sReport += icValidateCriticalErrorMsg;
1945 ! sReport += "Unknown Profile Class.\r\n";
1946 rv = icMaxStatus(rv, icValidateCriticalError);
1952 sReport += icValidateCriticalErrorMsg;
1953 ! sReport += "Unknown Profile Class.\n";
1954 rv = icMaxStatus(rv, icValidateCriticalError);
1959 // Check for duplicate tags
1960 if (!AreTagsUnique()) {
1961 sReport += icValidateWarning;
1962 ! sReport += " - There are duplicate tags.\r\n";
1963 rv =icMaxStatus(rv, icValidateWarning);
1967 // Check for duplicate tags
1968 if (!AreTagsUnique()) {
1969 sReport += icValidateWarning;
1970 ! sReport += " - There are duplicate tags.\n";
1971 rv =icMaxStatus(rv, icValidateWarning);
1976 sReport = icValidateCriticalErrorMsg;
1978 sReport += szFilename;
1979 ! sReport += "- Invalid Filename\r\n";
1984 sReport = icValidateCriticalErrorMsg;
1986 sReport += szFilename;
1987 ! sReport += "- Invalid Filename\n";
1991 *** misc/SampleICC-1.3.2/IccProfLib/IccTagBasic.cpp Mon Aug 20 22:05:00 2007
1992 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagBasic.cpp Fri Jan 25 14:24:00 2008
1996 sReport += icValidateNonCompliantMsg;
1997 sReport += Info.GetSigName(sig);
1998 ! sReport += " - Reserved Value must be zero.\r\n";
2000 rv = icValidateNonCompliant;
2004 sReport += icValidateNonCompliantMsg;
2005 sReport += Info.GetSigName(sig);
2006 ! sReport += " - Reserved Value must be zero.\n";
2008 rv = icValidateNonCompliant;
2012 sprintf(buf, "%u Bytes.", m_nSize-4);
2013 sDescription += buf;
2015 ! sDescription += "\r\n\r\nData Follows:\r\n";
2017 icMemDump(sDescription, m_pData+4, m_nSize-4);
2020 sprintf(buf, "%u Bytes.", m_nSize-4);
2021 sDescription += buf;
2023 ! sDescription += "\n\nData Follows:\n";
2025 icMemDump(sDescription, m_pData+4, m_nSize-4);
2029 if (m_szText && *m_szText)
2030 sDescription += m_szText;
2032 ! sDescription += "\"\r\n";
2037 if (m_szText && *m_szText)
2038 sDescription += m_szText;
2040 ! sDescription += "\"\n";
2047 sReport += icValidateNonCompliantMsg;
2048 sReport += sSigName;
2049 ! sReport += " - Tag must have at least seven text characters.\r\n";
2050 rv = icMaxStatus(rv, icValidateNonCompliant);
2055 sReport += icValidateNonCompliantMsg;
2056 sReport += sSigName;
2057 ! sReport += " - Tag must have at least seven text characters.\n";
2058 rv = icMaxStatus(rv, icValidateNonCompliant);
2064 sReport += icValidateWarningMsg;
2065 sReport += sSigName;
2066 ! sReport += " - Unknown Tag.\r\n";
2067 rv = icMaxStatus(rv, icValidateWarning);
2072 sReport += icValidateWarningMsg;
2073 sReport += sSigName;
2074 ! sReport += " - Unknown Tag.\n";
2075 rv = icMaxStatus(rv, icValidateWarning);
2080 if (m_szText[i]&0x80) {
2081 sReport += icValidateWarning;
2082 sReport += sSigName;
2083 ! sReport += " - Text do not contain 7bit data.\r\n";
2088 if (m_szText[i]&0x80) {
2089 sReport += icValidateWarning;
2090 sReport += sSigName;
2091 ! sReport += " - Text do not contain 7bit data.\n";
2098 sReport += icValidateWarningMsg;
2099 sReport += sSigName;
2100 ! sReport += " - Empty Tag.\r\n";
2101 rv = icMaxStatus(rv, icValidateWarning);
2106 sReport += icValidateWarningMsg;
2107 sReport += sSigName;
2108 ! sReport += " - Empty Tag.\n";
2109 rv = icMaxStatus(rv, icValidateWarning);
2114 if (m_szText && *m_szText)
2115 sDescription += m_szText;
2117 ! sDescription += "\"\r\n";
2122 if (m_szText && *m_szText)
2123 sDescription += m_szText;
2125 ! sDescription += "\"\n";
2131 if (m_nScriptSize>67) {
2132 sReport += icValidateNonCompliantMsg;
2133 sReport += sSigName;
2134 ! sReport += " - ScriptCode count must not be greater than 67.\r\n";
2136 rv =icMaxStatus(rv, icValidateNonCompliant);
2139 if (m_nScriptSize>67) {
2140 sReport += icValidateNonCompliantMsg;
2141 sReport += sSigName;
2142 ! sReport += " - ScriptCode count must not be greater than 67.\n";
2144 rv =icMaxStatus(rv, icValidateNonCompliant);
2150 sDescription += Fmt.GetSigName(m_nSig);
2151 ! sDescription += "\r\n";
2158 sDescription += Fmt.GetSigName(m_nSig);
2159 ! sDescription += "\n";
2166 sReport += icValidateNonCompliantMsg;
2167 sReport += sSigName;
2168 ! sprintf(buf, " - %s: Unknown Technology.\r\n", Info.GetSigName(m_nSig));
2170 rv = icMaxStatus(rv, icValidateNonCompliant);
2174 sReport += icValidateNonCompliantMsg;
2175 sReport += sSigName;
2176 ! sprintf(buf, " - %s: Unknown Technology.\n", Info.GetSigName(m_nSig));
2178 rv = icMaxStatus(rv, icValidateNonCompliant);
2183 sReport += icValidateNonCompliantMsg;
2184 sReport += sSigName;
2185 ! sprintf(buf, " - %s: Unknown Reference Medium Gamut.\r\n", Info.GetSigName(m_nSig));
2187 rv = icMaxStatus(rv, icValidateNonCompliant);
2191 sReport += icValidateNonCompliantMsg;
2192 sReport += sSigName;
2193 ! sprintf(buf, " - %s: Unknown Reference Medium Gamut.\n", Info.GetSigName(m_nSig));
2195 rv = icMaxStatus(rv, icValidateNonCompliant);
2200 sReport += icValidateNonCompliantMsg;
2201 sReport += sSigName;
2202 ! sprintf(buf, " - %s: Unknown Colorimetric Intent Image State.\r\n", Info.GetSigName(m_nSig));
2204 rv = icMaxStatus(rv, icValidateNonCompliant);
2208 sReport += icValidateNonCompliantMsg;
2209 sReport += sSigName;
2210 ! sprintf(buf, " - %s: Unknown Colorimetric Intent Image State.\n", Info.GetSigName(m_nSig));
2212 rv = icMaxStatus(rv, icValidateNonCompliant);
2217 sDescription.reserve(sDescription.size() + m_nSize*79);
2219 ! sprintf(buf, "BEGIN_NAMED_COLORS flags=%08x %u %u\r\n", m_nVendorFlags, m_nSize, m_nDeviceCoords);
2220 sDescription += buf;
2222 for (i=0; i<m_nSize; i++) {
2225 sDescription.reserve(sDescription.size() + m_nSize*79);
2227 ! sprintf(buf, "BEGIN_NAMED_COLORS flags=%08x %u %u\n", m_nVendorFlags, m_nSize, m_nDeviceCoords);
2228 sDescription += buf;
2230 for (i=0; i<m_nSize; i++) {
2233 sDescription += buf;
2236 ! sDescription += "\r\n";
2238 pNamedColor = (SIccNamedColorEntry*)((icChar*)pNamedColor + m_nColorEntrySize);
2241 sDescription += buf;
2244 ! sDescription += "\n";
2246 pNamedColor = (SIccNamedColorEntry*)((icChar*)pNamedColor + m_nColorEntrySize);
2251 sReport += icValidateWarningMsg;
2252 sReport += sSigName;
2253 ! sReport += " - Empty tag!\r\n";
2254 rv = icMaxStatus(rv, icValidateWarning);
2259 sReport += icValidateWarningMsg;
2260 sReport += sSigName;
2261 ! sReport += " - Empty tag!\n";
2262 rv = icMaxStatus(rv, icValidateWarning);
2267 if (m_nDeviceCoords != nCoords) {
2268 sReport += icValidateNonCompliantMsg;
2269 sReport += sSigName;
2270 ! sReport += " - Incorrect number of device co-ordinates.\r\n";
2271 rv = icMaxStatus(rv, icValidateNonCompliant);
2275 if (m_nDeviceCoords != nCoords) {
2276 sReport += icValidateNonCompliantMsg;
2277 sReport += sSigName;
2278 ! sReport += " - Incorrect number of device co-ordinates.\n";
2279 rv = icMaxStatus(rv, icValidateNonCompliant);
2285 sReport += icValidateWarningMsg;
2286 sReport += sSigName;
2287 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
2288 rv = icMaxStatus(rv, icValidateWarning);
2293 sReport += icValidateWarningMsg;
2294 sReport += sSigName;
2295 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
2296 rv = icMaxStatus(rv, icValidateWarning);
2303 if (m_nSize == 1 ) {
2304 ! 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));
2305 sDescription += buf;
2311 if (m_nSize == 1 ) {
2312 ! sprintf(buf, "X=%.4lf, Y=%.4lf, Z=%.4lf\n", icFtoD(m_XYZ[0].X), icFtoD(m_XYZ[0].Y), icFtoD(m_XYZ[0].Z));
2313 sDescription += buf;
2318 sDescription.reserve(sDescription.size() + m_nSize*79);
2320 for (i=0; i<m_nSize; i++) {
2321 ! 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));
2322 sDescription += buf;
2326 sDescription.reserve(sDescription.size() + m_nSize*79);
2328 for (i=0; i<m_nSize; i++) {
2329 ! 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));
2330 sDescription += buf;
2336 sReport += icValidateWarningMsg;
2337 sReport += sSigName;
2338 ! sReport += " - Empty tag.\r\n";
2340 rv = icMaxStatus(rv, icValidateWarning);
2344 sReport += icValidateWarningMsg;
2345 sReport += sSigName;
2346 ! sReport += " - Empty tag.\n";
2348 rv = icMaxStatus(rv, icValidateWarning);
2354 //sDescription.reserve(sDescription.size() + m_nChannels*79);
2355 ! sprintf(buf, "Number of Channels : %u\r\n", m_nChannels);
2356 sDescription += buf;
2358 ! sprintf(buf, "Colorant Encoding : %s\r\n", Fmt.GetColorantEncoding((icColorantEncoding)m_nColorantType));
2359 sDescription += buf;
2361 for (i=0; i<m_nChannels; i++) {
2362 ! sprintf(buf, "value[%u]: x=%.3lf, y=%.3lf\r\n", i, icUFtoD(m_xy[i].x), icUFtoD(m_xy[i].y));
2363 sDescription += buf;
2369 //sDescription.reserve(sDescription.size() + m_nChannels*79);
2370 ! sprintf(buf, "Number of Channels : %u\n", m_nChannels);
2371 sDescription += buf;
2373 ! sprintf(buf, "Colorant Encoding : %s\n", Fmt.GetColorantEncoding((icColorantEncoding)m_nColorantType));
2374 sDescription += buf;
2376 for (i=0; i<m_nChannels; i++) {
2377 ! sprintf(buf, "value[%u]: x=%.3lf, y=%.3lf\n", i, icUFtoD(m_xy[i].x), icUFtoD(m_xy[i].y));
2378 sDescription += buf;
2383 if (m_nChannels!=3) {
2384 sReport += icValidateCriticalErrorMsg;
2385 sReport += sSigName;
2386 ! sReport += " - Number of device channels must be three.\r\n";
2387 rv = icMaxStatus(rv, icValidateCriticalError);
2391 if (m_nChannels!=3) {
2392 sReport += icValidateCriticalErrorMsg;
2393 sReport += sSigName;
2394 ! sReport += " - Number of device channels must be three.\n";
2395 rv = icMaxStatus(rv, icValidateCriticalError);
2400 (m_xy[2].x != icDtoUF((icFloatNumber)0.150)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.060)) ) {
2401 sReport += icValidateNonCompliantMsg;
2402 sReport += sSigName;
2403 ! sReport += " - Chromaticity data does not match specification.\r\n";
2404 rv = icMaxStatus(rv, icValidateNonCompliant);
2408 (m_xy[2].x != icDtoUF((icFloatNumber)0.150)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.060)) ) {
2409 sReport += icValidateNonCompliantMsg;
2410 sReport += sSigName;
2411 ! sReport += " - Chromaticity data does not match specification.\n";
2412 rv = icMaxStatus(rv, icValidateNonCompliant);
2417 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2418 sReport += icValidateNonCompliantMsg;
2419 sReport += sSigName;
2420 ! sReport += " - Chromaticity data does not match specification.\r\n";
2421 rv = icMaxStatus(rv, icValidateNonCompliant);
2425 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2426 sReport += icValidateNonCompliantMsg;
2427 sReport += sSigName;
2428 ! sReport += " - Chromaticity data does not match specification.\n";
2429 rv = icMaxStatus(rv, icValidateNonCompliant);
2434 (m_xy[2].x != icDtoUF((icFloatNumber)0.15)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.06)) ) {
2435 sReport += icValidateNonCompliantMsg;
2436 sReport += sSigName;
2437 ! sReport += " - Chromaticity data does not match specification.\r\n";
2438 rv = icMaxStatus(rv, icValidateNonCompliant);
2442 (m_xy[2].x != icDtoUF((icFloatNumber)0.15)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.06)) ) {
2443 sReport += icValidateNonCompliantMsg;
2444 sReport += sSigName;
2445 ! sReport += " - Chromaticity data does not match specification.\n";
2446 rv = icMaxStatus(rv, icValidateNonCompliant);
2451 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2452 sReport += icValidateNonCompliantMsg;
2453 sReport += sSigName;
2454 ! sReport += " - Chromaticity data does not match specification.\r\n";
2455 rv = icMaxStatus(rv, icValidateNonCompliant);
2459 (m_xy[2].x != icDtoUF((icFloatNumber)0.155)) || (m_xy[2].y != icDtoUF((icFloatNumber)0.070)) ) {
2460 sReport += icValidateNonCompliantMsg;
2461 sReport += sSigName;
2462 ! sReport += " - Chromaticity data does not match specification.\n";
2463 rv = icMaxStatus(rv, icValidateNonCompliant);
2469 sReport += icValidateNonCompliantMsg;
2470 sReport += sSigName;
2471 ! sReport += " - Invalid colorant type encoding.\r\n";
2472 rv = icMaxStatus(rv, icValidateNonCompliant);
2477 sReport += icValidateNonCompliantMsg;
2478 sReport += sSigName;
2479 ! sReport += " - Invalid colorant type encoding.\n";
2480 rv = icMaxStatus(rv, icValidateNonCompliant);
2486 if (m_nSize == 1 ) {
2487 if (Tsig==icSigS15Fixed16ArrayType)
2488 ! sprintf(buf, "Value = %.4lf\r\n", icFtoD(m_Num[0]));
2490 ! sprintf(buf, "Value = %.4lf\r\n", icUFtoD(m_Num[0]));
2491 sDescription += buf;
2496 if (m_nSize == 1 ) {
2497 if (Tsig==icSigS15Fixed16ArrayType)
2498 ! sprintf(buf, "Value = %.4lf\n", icFtoD(m_Num[0]));
2500 ! sprintf(buf, "Value = %.4lf\n", icUFtoD(m_Num[0]));
2501 sDescription += buf;
2508 if (Tsig==icSigS15Fixed16ArrayType && m_nSize==9) {
2509 ! sDescription += "Matrix Form:\r\n";
2510 icMatrixDump(sDescription, (icS15Fixed16Number*)m_Num);
2512 ! sDescription += "\r\nArrayForm:\r\n";
2514 sDescription.reserve(sDescription.size() + m_nSize*79);
2516 for (i=0; i<m_nSize; i++) {
2517 if (Tsig==icSigS15Fixed16ArrayType)
2518 ! sprintf(buf, "Value[%u] = %.4lf\r\n", i, icFtoD(m_Num[i]));
2520 ! sprintf(buf, "Value[%u] = %.4lf\r\n", i, icUFtoD(m_Num[i]));
2521 sDescription += buf;
2527 if (Tsig==icSigS15Fixed16ArrayType && m_nSize==9) {
2528 ! sDescription += "Matrix Form:\n";
2529 icMatrixDump(sDescription, (icS15Fixed16Number*)m_Num);
2531 ! sDescription += "\nArrayForm:\n";
2533 sDescription.reserve(sDescription.size() + m_nSize*79);
2535 for (i=0; i<m_nSize; i++) {
2536 if (Tsig==icSigS15Fixed16ArrayType)
2537 ! sprintf(buf, "Value[%u] = %.4lf\n", i, icFtoD(m_Num[i]));
2539 ! sprintf(buf, "Value[%u] = %.4lf\n", i, icUFtoD(m_Num[i]));
2540 sDescription += buf;
2547 if (m_nSize == 1 ) {
2548 ! sprintf(buf, "Value = %u (0x%x)\r\n", m_Num[0], m_Num[0]);
2549 sDescription += buf;
2555 if (m_nSize == 1 ) {
2556 ! sprintf(buf, "Value = %u (0x%x)\n", m_Num[0], m_Num[0]);
2557 sDescription += buf;
2562 sDescription.reserve(sDescription.size() + m_nSize*79);
2564 for (i=0; i<m_nSize; i++) {
2565 ! sprintf(buf, "Value[%u] = %u (0x%x)\r\n", i, m_Num[i], m_Num[i]);
2566 sDescription += buf;
2570 sDescription.reserve(sDescription.size() + m_nSize*79);
2572 for (i=0; i<m_nSize; i++) {
2573 ! sprintf(buf, "Value[%u] = %u (0x%x)\n", i, m_Num[i], m_Num[i]);
2574 sDescription += buf;
2582 ! sDescription += Fmt.GetStandardObserverName(m_Data.stdObserver); sDescription += "\r\n";
2583 ! sprintf(buf, "Backing measurement: X=%.4lf, Y=%.4lf, Z=%.4lf\r\n",
2584 icFtoD(m_Data.backing.X),
2585 icFtoD(m_Data.backing.Y),
2586 icFtoD(m_Data.backing.Z));
2587 sDescription += buf;
2588 ! sDescription += Fmt.GetMeasurementGeometryName(m_Data.geometry); sDescription += "\r\n";
2589 ! sDescription += Fmt.GetMeasurementFlareName(m_Data.flare); sDescription += "\r\n";
2590 ! sDescription += Fmt.GetIlluminantName(m_Data.illuminant); sDescription += "\r\n";
2598 ! sDescription += Fmt.GetStandardObserverName(m_Data.stdObserver); sDescription += "\n";
2599 ! sprintf(buf, "Backing measurement: X=%.4lf, Y=%.4lf, Z=%.4lf\n",
2600 icFtoD(m_Data.backing.X),
2601 icFtoD(m_Data.backing.Y),
2602 icFtoD(m_Data.backing.Z));
2603 sDescription += buf;
2604 ! sDescription += Fmt.GetMeasurementGeometryName(m_Data.geometry); sDescription += "\n";
2605 ! sDescription += Fmt.GetMeasurementFlareName(m_Data.flare); sDescription += "\n";
2606 ! sDescription += Fmt.GetIlluminantName(m_Data.illuminant); sDescription += "\n";
2613 sReport += icValidateNonCompliantMsg;
2614 sReport += sSigName;
2615 ! sReport += " - Invalid standard observer encoding.\r\n";
2616 rv = icMaxStatus(rv, icValidateNonCompliant);
2621 sReport += icValidateNonCompliantMsg;
2622 sReport += sSigName;
2623 ! sReport += " - Invalid standard observer encoding.\n";
2624 rv = icMaxStatus(rv, icValidateNonCompliant);
2630 sReport += icValidateNonCompliantMsg;
2631 sReport += sSigName;
2632 ! sReport += " - Invalid measurement geometry encoding.\r\n";
2633 rv = icMaxStatus(rv, icValidateNonCompliant);
2638 sReport += icValidateNonCompliantMsg;
2639 sReport += sSigName;
2640 ! sReport += " - Invalid measurement geometry encoding.\n";
2641 rv = icMaxStatus(rv, icValidateNonCompliant);
2647 sReport += icValidateNonCompliantMsg;
2648 sReport += sSigName;
2649 ! sReport += " - Invalid standard illuminant encoding.\r\n";
2650 rv = icMaxStatus(rv, icValidateNonCompliant);
2655 sReport += icValidateNonCompliantMsg;
2656 sReport += sSigName;
2657 ! sReport += " - Invalid standard illuminant encoding.\n";
2658 rv = icMaxStatus(rv, icValidateNonCompliant);
2664 for (i=m_Strings->begin(); i!=m_Strings->end(); i++) {
2665 if (i!=m_Strings->begin())
2666 ! sDescription += "\r\n";
2668 ! sprintf(szBuf, "Language = '%c%c', Region = '%c%c'\r\n",
2669 i->m_nLanguageCode>>8, i->m_nLanguageCode,
2670 i->m_nCountryCode>>8, i->m_nCountryCode);
2674 for (i=m_Strings->begin(); i!=m_Strings->end(); i++) {
2675 if (i!=m_Strings->begin())
2676 ! sDescription += "\n";
2678 ! sprintf(szBuf, "Language = '%c%c', Region = '%c%c'\n",
2679 i->m_nLanguageCode>>8, i->m_nLanguageCode,
2680 i->m_nCountryCode>>8, i->m_nCountryCode);
2684 i->GetAnsi(szBuf, nSize);
2685 sDescription += "\"";
2686 sDescription += szBuf;
2687 ! sDescription += "\"\r\n";
2692 i->GetAnsi(szBuf, nSize);
2693 sDescription += "\"";
2694 sDescription += szBuf;
2695 ! sDescription += "\"\n";
2701 if (!m_Strings->size()) {
2702 sReport += icValidateWarningMsg;
2703 sReport += sSigName;
2704 ! sReport += " - Empty tag!\r\n";
2705 rv = icMaxStatus(rv, icValidateWarning);
2709 if (!m_Strings->size()) {
2710 sReport += icValidateWarningMsg;
2711 sReport += sSigName;
2712 ! sReport += " - Empty tag!\n";
2713 rv = icMaxStatus(rv, icValidateWarning);
2721 ! sDescription = "\r\nData:\r\n";
2723 if (IsTypeAscii()) {
2724 ! sprintf(buf, "%s\r\n", (icChar*)m_pData);
2725 sDescription += buf;
2728 for (int i = 0; i<(int)m_nSize; i++) {
2729 ! sprintf(buf, "%d\r\n", m_pData[i]);
2730 sDescription += buf;
2737 ! sDescription = "\nData:\n";
2739 if (IsTypeAscii()) {
2740 ! sprintf(buf, "%s\n", (icChar*)m_pData);
2741 sDescription += buf;
2744 for (int i = 0; i<(int)m_nSize; i++) {
2745 ! sprintf(buf, "%d\n", m_pData[i]);
2746 sDescription += buf;
2752 sReport += icValidateNonCompliantMsg;
2753 sReport += sSigName;
2754 ! sReport += " - Invalid data flag encoding.\r\n";
2755 rv = icMaxStatus(rv, icValidateNonCompliant);
2760 sReport += icValidateNonCompliantMsg;
2761 sReport += sSigName;
2762 ! sReport += " - Invalid data flag encoding.\n";
2763 rv = icMaxStatus(rv, icValidateNonCompliant);
2770 sDescription = "Date = ";
2771 ! sprintf(buf, "%u-%u-%u\r\n", m_DateTime.month, m_DateTime.day, m_DateTime.year);
2772 sDescription += buf;
2774 sDescription += "Time = ";
2775 ! sprintf(buf, "%u:%u:%u\r\n", m_DateTime.hours, m_DateTime.minutes, m_DateTime.seconds);
2776 sDescription += buf;
2782 sDescription = "Date = ";
2783 ! sprintf(buf, "%u-%u-%u\n", m_DateTime.month, m_DateTime.day, m_DateTime.year);
2784 sDescription += buf;
2786 sDescription += "Time = ";
2787 ! sprintf(buf, "%u:%u:%u\n", m_DateTime.hours, m_DateTime.minutes, m_DateTime.seconds);
2788 sDescription += buf;
2796 ! sprintf(buf, "Colorant Count : %u\r\n", m_nCount);
2797 sDescription += buf;
2798 ! sDescription += "Order of Colorants:\r\n";
2800 for (int i=0; i<(int)m_nCount; i++) {
2801 ! sprintf(buf, "%u\r\n", m_pData[i]);
2802 sDescription += buf;
2809 ! sprintf(buf, "Colorant Count : %u\n", m_nCount);
2810 sDescription += buf;
2811 ! sDescription += "Order of Colorants:\n";
2813 for (int i=0; i<(int)m_nCount; i++) {
2814 ! sprintf(buf, "%u\n", m_pData[i]);
2815 sDescription += buf;
2821 sReport += icValidateWarningMsg;
2822 sReport += sSigName;
2823 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
2824 rv = icMaxStatus(rv, icValidateWarning);
2829 sReport += icValidateWarningMsg;
2830 sReport += sSigName;
2831 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
2832 rv = icMaxStatus(rv, icValidateWarning);
2837 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
2838 sReport += icValidateNonCompliantMsg;
2839 sReport += sSigName;
2840 ! sReport += " - Incorrect number of colorants.\r\n";
2841 rv = icMaxStatus(rv, icValidateNonCompliant);
2845 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
2846 sReport += icValidateNonCompliantMsg;
2847 sReport += sSigName;
2848 ! sReport += " - Incorrect number of colorants.\n";
2849 rv = icMaxStatus(rv, icValidateNonCompliant);
2854 icUInt32Number i, nLen, nMaxLen=0;
2855 icFloatNumber Lab[3];
2857 ! sprintf(buf, "BEGIN_COLORANTS %u\r\n", m_nCount);
2858 sDescription += buf;
2860 for (i=0; i<m_nCount; i++) {
2862 icUInt32Number i, nLen, nMaxLen=0;
2863 icFloatNumber Lab[3];
2865 ! sprintf(buf, "BEGIN_COLORANTS %u\n", m_nCount);
2866 sDescription += buf;
2868 for (i=0; i<m_nCount; i++) {
2871 sDescription += "# NAME ";
2873 if (m_PCS == icSigXYZData) {
2874 ! sprintf(buf, "XYZ_X XYZ_Y XYZ_Z\r\n");
2875 sDescription += buf;
2878 ! sprintf(buf, "Lab_L Lab_a Lab_b\r\n");
2879 sDescription += buf;
2881 for (i=0; i<m_nCount; i++) {
2883 sDescription += "# NAME ";
2885 if (m_PCS == icSigXYZData) {
2886 ! sprintf(buf, "XYZ_X XYZ_Y XYZ_Z\n");
2887 sDescription += buf;
2890 ! sprintf(buf, "Lab_L Lab_a Lab_b\n");
2891 sDescription += buf;
2893 for (i=0; i<m_nCount; i++) {
2896 sDescription += buf;
2898 if (m_PCS == icSigXYZData) {
2899 ! 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]));
2900 sDescription += buf;
2904 sDescription += buf;
2906 if (m_PCS == icSigXYZData) {
2907 ! 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]));
2908 sDescription += buf;
2913 Lab[1] = icU16toF(m_pData[i].data[1]);
2914 Lab[2] = icU16toF(m_pData[i].data[2]);
2916 ! sprintf(buf, "%7.4lf %8.4lf %8.4lf\r\n", Lab[0], Lab[1], Lab[2]);
2917 sDescription += buf;
2921 Lab[1] = icU16toF(m_pData[i].data[1]);
2922 Lab[2] = icU16toF(m_pData[i].data[2]);
2924 ! sprintf(buf, "%7.4lf %8.4lf %8.4lf\n", Lab[0], Lab[1], Lab[2]);
2925 sDescription += buf;
2931 sReport += icValidateWarningMsg;
2932 sReport += sSigName;
2933 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
2934 rv = icMaxStatus(rv, icValidateWarning);
2939 sReport += icValidateWarningMsg;
2940 sReport += sSigName;
2941 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
2942 rv = icMaxStatus(rv, icValidateWarning);
2947 if (pProfile->m_Header.deviceClass!=icSigLinkClass) {
2948 sReport += icValidateNonCompliantMsg;
2949 sReport += sSigName;
2950 ! sReport += " - Use of this tag is allowed only in DeviceLink Profiles.\r\n";
2951 rv = icMaxStatus(rv, icValidateNonCompliant);
2955 if (pProfile->m_Header.deviceClass!=icSigLinkClass) {
2956 sReport += icValidateNonCompliantMsg;
2957 sReport += sSigName;
2958 ! sReport += " - Use of this tag is allowed only in DeviceLink Profiles.\n";
2959 rv = icMaxStatus(rv, icValidateNonCompliant);
2964 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
2965 sReport += icValidateNonCompliantMsg;
2966 sReport += sSigName;
2967 ! sReport += " - Incorrect number of colorants.\r\n";
2968 rv = icMaxStatus(rv, icValidateNonCompliant);
2972 if (m_nCount != icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
2973 sReport += icValidateNonCompliantMsg;
2974 sReport += sSigName;
2975 ! sReport += " - Incorrect number of colorants.\n";
2976 rv = icMaxStatus(rv, icValidateNonCompliant);
2984 ! sprintf(buf, "Illuminant Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\r\n",
2985 icFtoD(m_XYZIllum.X),
2986 icFtoD(m_XYZIllum.Y),
2987 icFtoD(m_XYZIllum.Z));
2988 sDescription += buf;
2990 ! sprintf(buf, "Surround Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\r\n",
2991 icFtoD(m_XYZSurround.X),
2992 icFtoD(m_XYZSurround.Y),
2993 icFtoD(m_XYZSurround.Z));
2998 ! sprintf(buf, "Illuminant Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\n",
2999 icFtoD(m_XYZIllum.X),
3000 icFtoD(m_XYZIllum.Y),
3001 icFtoD(m_XYZIllum.Z));
3002 sDescription += buf;
3004 ! sprintf(buf, "Surround Tristimulus values: X = %.4lf, Y = %.4lf, Z = %.4lf\n",
3005 icFtoD(m_XYZSurround.X),
3006 icFtoD(m_XYZSurround.Y),
3007 icFtoD(m_XYZSurround.Z));
3010 sDescription += "Illuminant Type: ";
3012 sDescription += Fmt.GetIlluminantName(m_illumType);
3013 ! sDescription += "\r\n";
3018 sDescription += "Illuminant Type: ";
3020 sDescription += Fmt.GetIlluminantName(m_illumType);
3021 ! sDescription += "\n";
3027 icChar buf[128], buf2[28];
3028 icUInt32Number count=0;
3030 ! sprintf(buf, "Number of Profile Description Structures: %u\r\n", m_Descriptions->size());
3031 sDescription += buf;
3033 for (i=m_Descriptions->begin(); i!=m_Descriptions->end(); i++, count++) {
3034 ! sDescription += "\r\n";
3036 ! sprintf(buf, "Profile Description Structure Number [%u] follows:\r\n", count+1);
3037 sDescription += buf;
3039 ! sprintf(buf, "Device Manufacturer Signature: %s\r\n", icGetSig(buf2, i->m_deviceMfg, false));
3040 sDescription += buf;
3042 ! sprintf(buf, "Device Model Signature: %s\r\n", icGetSig(buf2, i->m_deviceModel, false));
3043 sDescription += buf;
3045 ! sprintf(buf, "Device Attributes: %08x%08x\r\n", (icUInt32Number)(i->m_attributes >> 32), (icUInt32Number)(i->m_attributes));
3046 sDescription += buf;
3048 ! sprintf(buf, "Device Technology Signature: %s\r\n", icGetSig(buf2, i->m_technology, false));
3049 sDescription += buf;
3051 ! sprintf(buf, "Description of device manufacturer: \r\n");
3052 sDescription += buf;
3053 i->m_deviceMfgDesc.Describe(sDescription);
3055 ! sprintf(buf, "Description of device model: \r\n");
3056 sDescription += buf;
3057 i->m_deviceModelDesc.Describe(sDescription);
3060 icChar buf[128], buf2[28];
3061 icUInt32Number count=0;
3063 ! sprintf(buf, "Number of Profile Description Structures: %u\n", m_Descriptions->size());
3064 sDescription += buf;
3066 for (i=m_Descriptions->begin(); i!=m_Descriptions->end(); i++, count++) {
3067 ! sDescription += "\n";
3069 ! sprintf(buf, "Profile Description Structure Number [%u] follows:\n", count+1);
3070 sDescription += buf;
3072 ! sprintf(buf, "Device Manufacturer Signature: %s\n", icGetSig(buf2, i->m_deviceMfg, false));
3073 sDescription += buf;
3075 ! sprintf(buf, "Device Model Signature: %s\n", icGetSig(buf2, i->m_deviceModel, false));
3076 sDescription += buf;
3078 ! sprintf(buf, "Device Attributes: %08x%08x\n", (icUInt32Number)(i->m_attributes >> 32), (icUInt32Number)(i->m_attributes));
3079 sDescription += buf;
3081 ! sprintf(buf, "Device Technology Signature: %s\n", icGetSig(buf2, i->m_technology, false));
3082 sDescription += buf;
3084 ! sprintf(buf, "Description of device manufacturer: \n");
3085 sDescription += buf;
3086 i->m_deviceMfgDesc.Describe(sDescription);
3088 ! sprintf(buf, "Description of device model: \n");
3089 sDescription += buf;
3090 i->m_deviceModelDesc.Describe(sDescription);
3095 sReport += icValidateNonCompliantMsg;
3096 sReport += sSigName;
3097 ! sprintf(buf, " - %s: Unknown Technology.\r\n", Info.GetSigName(i->m_technology));
3099 rv = icMaxStatus(rv, icValidateNonCompliant);
3103 sReport += icValidateNonCompliantMsg;
3104 sReport += sSigName;
3105 ! sprintf(buf, " - %s: Unknown Technology.\n", Info.GetSigName(i->m_technology));
3107 rv = icMaxStatus(rv, icValidateNonCompliant);
3111 sReport += icValidateNonCompliantMsg;
3112 sReport += sSigName;
3114 ! sReport += " Contains non-aligned deviceMfgDesc text tag information\r\n";
3116 rv = icMaxStatus(rv, icValidateNonCompliant);
3119 sReport += icValidateNonCompliantMsg;
3120 sReport += sSigName;
3122 ! sReport += " Contains non-aligned deviceMfgDesc text tag information\n";
3124 rv = icMaxStatus(rv, icValidateNonCompliant);
3128 sReport += icValidateNonCompliantMsg;
3129 sReport += sSigName;
3131 ! sReport += " Contains non-aligned deviceModelDesc text tag information\r\n";
3133 rv = icMaxStatus(rv, icValidateNonCompliant);
3136 sReport += icValidateNonCompliantMsg;
3137 sReport += sSigName;
3139 ! sReport += " Contains non-aligned deviceModelDesc text tag information\n";
3141 rv = icMaxStatus(rv, icValidateNonCompliant);
3145 CIccResponse16List::iterator j;
3147 sDescription += "Measurement Unit: ";
3148 ! sDescription += Fmt.GetMeasurementUnit((icSignature)GetMeasurementType()); sDescription += "\r\n";
3151 for (int i=0; i<m_nChannels; i++) {
3152 nResponseList = m_Response16ListArray[i];
3154 ! sDescription += "\r\n";
3155 ! sprintf(buf, "Maximum Colorant XYZ Measurement for Channel-%u : X=%.4lf, Y=%.4lf, Z=%.4lf\r\n", i+1,
3156 icFtoD(m_maxColorantXYZ[i].X), icFtoD(m_maxColorantXYZ[i].Y), icFtoD(m_maxColorantXYZ[i].Z));
3157 sDescription += buf;
3159 ! sprintf(buf, "Number of Measurements for Channel-%u : %u\r\n", i+1, nResponseList.size());
3160 sDescription += buf;
3162 ! sprintf(buf, "Measurement Data for Channel-%u follows:\r\n", i+1);
3163 sDescription += buf;
3165 for (j=nResponseList.begin(); j!=nResponseList.end(); j++) {
3166 ! sprintf(buf, "Device Value= %u : Measurement Value= %.4lf\r\n", j->deviceCode, icFtoD(j->measurementValue));
3167 sDescription += buf;
3171 CIccResponse16List::iterator j;
3173 sDescription += "Measurement Unit: ";
3174 ! sDescription += Fmt.GetMeasurementUnit((icSignature)GetMeasurementType()); sDescription += "\n";
3177 for (int i=0; i<m_nChannels; i++) {
3178 nResponseList = m_Response16ListArray[i];
3180 ! sDescription += "\n";
3181 ! sprintf(buf, "Maximum Colorant XYZ Measurement for Channel-%u : X=%.4lf, Y=%.4lf, Z=%.4lf\n", i+1,
3182 icFtoD(m_maxColorantXYZ[i].X), icFtoD(m_maxColorantXYZ[i].Y), icFtoD(m_maxColorantXYZ[i].Z));
3183 sDescription += buf;
3185 ! sprintf(buf, "Number of Measurements for Channel-%u : %u\n", i+1, nResponseList.size());
3186 sDescription += buf;
3188 ! sprintf(buf, "Measurement Data for Channel-%u follows:\n", i+1);
3189 sDescription += buf;
3191 for (j=nResponseList.begin(); j!=nResponseList.end(); j++) {
3192 ! sprintf(buf, "Device Value= %u : Measurement Value= %.4lf\n", j->deviceCode, icFtoD(j->measurementValue));
3193 sDescription += buf;
3199 sReport += icValidateNonCompliantMsg;
3200 sReport += sSigName;
3201 ! sReport += " - Unknown measurement unit signature.\r\n";
3202 rv = icMaxStatus(rv, icValidateNonCompliant);
3207 sReport += icValidateNonCompliantMsg;
3208 sReport += sSigName;
3209 ! sReport += " - Unknown measurement unit signature.\n";
3210 rv = icMaxStatus(rv, icValidateNonCompliant);
3216 sReport += icValidateNonCompliantMsg;
3217 sReport += sSigName;
3218 ! sReport += " - Incorrect number of channels.\r\n";
3219 rv = icMaxStatus(rv, icValidateNonCompliant);
3224 sReport += icValidateNonCompliantMsg;
3225 sReport += sSigName;
3226 ! sReport += " - Incorrect number of channels.\n";
3227 rv = icMaxStatus(rv, icValidateNonCompliant);
3232 CIccResponseCurveSet::iterator i;
3235 ! sprintf(buf, "Number of Channels: %u\r\n", m_nChannels);
3236 sDescription += buf;
3238 ! sprintf(buf, "Number of Measurement Types used: %u\r\n", m_ResponseCurves->size());
3239 sDescription += buf;
3242 for (i=m_ResponseCurves->begin(); i!=m_ResponseCurves->end(); i++, count++) {
3243 ! sDescription += "\r\n";
3245 ! sprintf(buf, "Response Curve for measurement type [%u] follows:\r\n", count+1);
3246 sDescription += buf;
3248 i->Describe(sDescription);
3250 CIccResponseCurveSet::iterator i;
3253 ! sprintf(buf, "Number of Channels: %u\n", m_nChannels);
3254 sDescription += buf;
3256 ! sprintf(buf, "Number of Measurement Types used: %u\n", m_ResponseCurves->size());
3257 sDescription += buf;
3260 for (i=m_ResponseCurves->begin(); i!=m_ResponseCurves->end(); i++, count++) {
3261 ! sDescription += "\n";
3263 ! sprintf(buf, "Response Curve for measurement type [%u] follows:\n", count+1);
3264 sDescription += buf;
3266 i->Describe(sDescription);
3270 sReport += icValidateWarningMsg;
3271 sReport += sSigName;
3272 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
3273 rv = icMaxStatus(rv, icValidateWarning);
3278 sReport += icValidateWarningMsg;
3279 sReport += sSigName;
3280 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
3281 rv = icMaxStatus(rv, icValidateWarning);
3286 if (m_nChannels!=icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3287 sReport += icValidateWarningMsg;
3288 sReport += sSigName;
3289 ! sReport += " - Incorrect number of channels.\r\n";
3292 if (!GetNumResponseCurveTypes()) {
3293 sReport += icValidateWarningMsg;
3294 sReport += sSigName;
3295 ! sReport += " - Empty Tag!.\r\n";
3296 rv = icMaxStatus(rv, icValidateWarning);
3300 if (m_nChannels!=icGetSpaceSamples(pProfile->m_Header.colorSpace)) {
3301 sReport += icValidateWarningMsg;
3302 sReport += sSigName;
3303 ! sReport += " - Incorrect number of channels.\n";
3306 if (!GetNumResponseCurveTypes()) {
3307 sReport += icValidateWarningMsg;
3308 sReport += sSigName;
3309 ! sReport += " - Empty Tag!.\n";
3310 rv = icMaxStatus(rv, icValidateWarning);
3313 *** misc/SampleICC-1.3.2/IccProfLib/IccTagLut.cpp Mon Aug 20 22:05:00 2007
3314 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagLut.cpp Fri Jan 25 14:24:00 2008
3317 icChar buf[128], *ptr;
3320 ! sprintf(buf, "BEGIN_CURVE In_Out\r\n");
3321 sDescription += buf;
3322 ! sDescription += "Y = X\r\n";
3324 else if (m_nSize==1) {
3325 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3326 ! sprintf(buf, "BEGIN_CURVE In_Out\r\n");
3327 sDescription += buf;
3328 ! sprintf(buf, "Y = X ^ %.4lf\r\n", dGamma);
3329 sDescription += buf;
3334 ! sprintf(buf, "BEGIN_LUT In_Out 1 1\r\n");
3335 sDescription += buf;
3336 ! sDescription += "IN OUT\r\n";
3338 for (i=0; i<(int)m_nSize; i++) {
3341 icChar buf[128], *ptr;
3344 ! sprintf(buf, "BEGIN_CURVE In_Out\n");
3345 sDescription += buf;
3346 ! sDescription += "Y = X\n";
3348 else if (m_nSize==1) {
3349 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3350 ! sprintf(buf, "BEGIN_CURVE In_Out\n");
3351 sDescription += buf;
3352 ! sprintf(buf, "Y = X ^ %.4lf\n", dGamma);
3353 sDescription += buf;
3358 ! sprintf(buf, "BEGIN_LUT In_Out 1 1\n");
3359 sDescription += buf;
3360 ! sDescription += "IN OUT\n";
3362 for (i=0; i<(int)m_nSize; i++) {
3369 ! strcpy(ptr, "\r\n");
3371 sDescription += buf;
3374 ! sDescription += "\r\n";
3382 ! strcpy(ptr, "\n");
3384 sDescription += buf;
3387 ! sDescription += "\n";
3393 icChar buf[128], *ptr;
3396 ! sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
3397 sDescription += buf;
3398 ! sDescription += "Y = X\r\n";
3400 else if (m_nSize==1) {
3401 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3402 ! sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
3403 sDescription += buf;
3404 ! sprintf(buf, "Y = X ^ %.4lf\r\n", dGamma);
3405 sDescription += buf;
3410 ! sprintf(buf, "BEGIN_LUT %s 1 1\r\n", szName);
3411 sDescription += buf;
3412 ! sDescription += "IN OUT\r\n";
3414 sDescription.reserve(sDescription.size() + m_nSize * 20);
3417 icChar buf[128], *ptr;
3420 ! sprintf(buf, "BEGIN_CURVE %s\n", szName);
3421 sDescription += buf;
3422 ! sDescription += "Y = X\n";
3424 else if (m_nSize==1) {
3425 icFloatNumber dGamma = (icFloatNumber)(m_Curve[0] * 256.0);
3426 ! sprintf(buf, "BEGIN_CURVE %s\n", szName);
3427 sDescription += buf;
3428 ! sprintf(buf, "Y = X ^ %.4lf\n", dGamma);
3429 sDescription += buf;
3434 ! sprintf(buf, "BEGIN_LUT %s 1 1\n", szName);
3435 sDescription += buf;
3436 ! sDescription += "IN OUT\n";
3438 sDescription.reserve(sDescription.size() + m_nSize * 20);
3445 ! strcpy(ptr, "\r\n");
3447 sDescription += buf;
3450 ! sDescription += "\r\n";
3458 ! strcpy(ptr, "\n");
3460 sDescription += buf;
3463 ! sDescription += "\n";
3469 if (m_Curve[0]>0.0 || m_Curve[m_nSize-1]<1.0) {
3470 sReport += icValidateWarningMsg;
3471 sReport += sSigName;
3472 ! sReport += " - Curve cannot be accurately inverted.\r\n";
3473 rv = icMaxStatus(rv, icValidateWarning);
3477 if (m_Curve[0]>0.0 || m_Curve[m_nSize-1]<1.0) {
3478 sReport += icValidateWarningMsg;
3479 sReport += sSigName;
3480 ! sReport += " - Curve cannot be accurately inverted.\n";
3481 rv = icMaxStatus(rv, icValidateWarning);
3489 ! sprintf(buf, "FunctionType: %04Xh\r\n", m_nFunctionType);
3490 sDescription += buf;
3492 switch(m_nFunctionType) {
3494 ! sprintf(buf, "Y = X ^ %.4lf\r\n", icFtoD(m_Param[0]));
3495 sDescription += buf;
3499 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf / %.4lf)\r\n",
3500 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3501 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3502 sDescription += buf;
3504 ! sprintf(buf, "Y = 0 when (X < %.4lf / %.4lf)\r\n",
3505 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3506 sDescription += buf;
3510 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf / %.4lf)\r\n",
3511 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3513 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3514 sDescription += buf;
3516 ! sprintf(buf, "Y = %.4lf when (X < %.4lf / %.4lf)\r\n", icFtoD(m_Param[3]),
3517 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3518 sDescription += buf;
3522 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf)\r\n",
3523 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3524 icFtoD(m_Param[4]));
3525 sDescription += buf;
3527 ! sprintf(buf, "Y = %lf * X when (X < %.4lf)\r\n",
3528 icFtoD(m_Param[3]), icFtoD(m_Param[4]));
3529 sDescription += buf;
3533 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf)\r\n",
3534 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3535 icFtoD(m_Param[5]), icFtoD(m_Param[4]));
3536 sDescription += buf;
3538 ! sprintf(buf, "Y = %lf * X + %.4lf when (X < %.4lf)\r\n",
3539 icFtoD(m_Param[3]), icFtoD(m_Param[6]), icFtoD(m_Param[4]));
3540 sDescription += buf;
3546 ! sprintf(buf, "FunctionType: %04Xh\n", m_nFunctionType);
3547 sDescription += buf;
3549 switch(m_nFunctionType) {
3551 ! sprintf(buf, "Y = X ^ %.4lf\n", icFtoD(m_Param[0]));
3552 sDescription += buf;
3556 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf / %.4lf)\n",
3557 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3558 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3559 sDescription += buf;
3561 ! sprintf(buf, "Y = 0 when (X < %.4lf / %.4lf)\n",
3562 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3563 sDescription += buf;
3567 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf / %.4lf)\n",
3568 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3570 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3571 sDescription += buf;
3573 ! sprintf(buf, "Y = %.4lf when (X < %.4lf / %.4lf)\n", icFtoD(m_Param[3]),
3574 -icFtoD(m_Param[2]), icFtoD(m_Param[1]));
3575 sDescription += buf;
3579 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf when (X >= %.4lf)\n",
3580 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3581 icFtoD(m_Param[4]));
3582 sDescription += buf;
3584 ! sprintf(buf, "Y = %lf * X when (X < %.4lf)\n",
3585 icFtoD(m_Param[3]), icFtoD(m_Param[4]));
3586 sDescription += buf;
3590 ! sprintf(buf, "Y = (%.4lf * X + %.4lf) ^ %.4lf + %.4lf when (X >= %.4lf)\n",
3591 icFtoD(m_Param[1]), icFtoD(m_Param[2]), icFtoD(m_Param[0]),
3592 icFtoD(m_Param[5]), icFtoD(m_Param[4]));
3593 sDescription += buf;
3595 ! sprintf(buf, "Y = %lf * X + %.4lf when (X < %.4lf)\n",
3596 icFtoD(m_Param[3]), icFtoD(m_Param[6]), icFtoD(m_Param[4]));
3597 sDescription += buf;
3604 ! sprintf(buf, "Unknown Function with %d parameters:\r\n");
3605 sDescription += buf;
3607 for (i=0; i<m_nNumParam; i++) {
3608 ! sprintf(buf, "Param[%d] = %.4lf\r\n", i, icFtoD(m_Param[i]));
3609 sDescription += buf;
3616 ! sprintf(buf, "Unknown Function with %d parameters:\n", m_nNumParam);
3617 sDescription += buf;
3619 for (i=0; i<m_nNumParam; i++) {
3620 ! sprintf(buf, "Param[%d] = %.4lf\n", i, icFtoD(m_Param[i]));
3621 sDescription += buf;
3629 ! sprintf(buf, "BEGIN_CURVE %s\r\n", szName);
3630 sDescription += buf;
3631 Describe(sDescription);
3632 ! sDescription += "\r\n";
3640 ! sprintf(buf, "BEGIN_CURVE %s\n", szName);
3641 sDescription += buf;
3642 Describe(sDescription);
3643 ! sDescription += "\n";
3649 if (m_nReserved2!=0) {
3650 sReport += icValidateNonCompliantMsg;
3651 sReport += sSigName;
3652 ! sReport += " - Reserved Value must be zero.\r\n";
3654 rv = icMaxStatus(rv, icValidateNonCompliant);
3657 if (m_nReserved2!=0) {
3658 sReport += icValidateNonCompliantMsg;
3659 sReport += sSigName;
3660 ! sReport += " - Reserved Value must be zero.\n";
3662 rv = icMaxStatus(rv, icValidateNonCompliant);
3666 if (m_nNumParam!=1) {
3667 sReport += icValidateCriticalErrorMsg;
3668 sReport += sSigName;
3669 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3670 rv = icMaxStatus(rv, icValidateCriticalError);
3674 if (m_nNumParam!=1) {
3675 sReport += icValidateCriticalErrorMsg;
3676 sReport += sSigName;
3677 ! sReport += " - Number of parameters inconsistent with function type.\n";
3678 rv = icMaxStatus(rv, icValidateCriticalError);
3683 if (m_nNumParam!=3) {
3684 sReport += icValidateCriticalErrorMsg;
3685 sReport += sSigName;
3686 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3687 rv = icMaxStatus(rv, icValidateCriticalError);
3691 if (m_nNumParam!=3) {
3692 sReport += icValidateCriticalErrorMsg;
3693 sReport += sSigName;
3694 ! sReport += " - Number of parameters inconsistent with function type.\n";
3695 rv = icMaxStatus(rv, icValidateCriticalError);
3700 if (m_nNumParam!=4) {
3701 sReport += icValidateCriticalErrorMsg;
3702 sReport += sSigName;
3703 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3704 rv = icMaxStatus(rv, icValidateCriticalError);
3708 if (m_nNumParam!=4) {
3709 sReport += icValidateCriticalErrorMsg;
3710 sReport += sSigName;
3711 ! sReport += " - Number of parameters inconsistent with function type.\n";
3712 rv = icMaxStatus(rv, icValidateCriticalError);
3717 if (m_nNumParam!=5) {
3718 sReport += icValidateCriticalErrorMsg;
3719 sReport += sSigName;
3720 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3721 rv = icMaxStatus(rv, icValidateCriticalError);
3725 if (m_nNumParam!=5) {
3726 sReport += icValidateCriticalErrorMsg;
3727 sReport += sSigName;
3728 ! sReport += " - Number of parameters inconsistent with function type.\n";
3729 rv = icMaxStatus(rv, icValidateCriticalError);
3734 if (m_nNumParam!=7) {
3735 sReport += icValidateCriticalErrorMsg;
3736 sReport += sSigName;
3737 ! sReport += " - Number of parameters inconsistent with function type.\r\n";
3738 rv = icMaxStatus(rv, icValidateCriticalError);
3742 if (m_nNumParam!=7) {
3743 sReport += icValidateCriticalErrorMsg;
3744 sReport += sSigName;
3745 ! sReport += " - Number of parameters inconsistent with function type.\n";
3746 rv = icMaxStatus(rv, icValidateCriticalError);
3752 sReport += icValidateCriticalErrorMsg;
3753 sReport += sSigName;
3754 ! sReport += " - Unknown function type.\r\n";
3755 rv = icMaxStatus(rv, icValidateCriticalError);
3760 sReport += icValidateCriticalErrorMsg;
3761 sReport += sSigName;
3762 ! sReport += " - Unknown function type.\n";
3763 rv = icMaxStatus(rv, icValidateCriticalError);
3768 if (lval>0.0 || uval<1.0) {
3769 sReport += icValidateWarningMsg;
3770 sReport += sSigName;
3771 ! sReport += " - Curve cannot be accurately inverted.\r\n";
3772 rv = icMaxStatus(rv, icValidateWarning);
3776 if (lval>0.0 || uval<1.0) {
3777 sReport += icValidateWarningMsg;
3778 sReport += sSigName;
3779 ! sReport += " - Curve cannot be accurately inverted.\n";
3780 rv = icMaxStatus(rv, icValidateWarning);
3788 ! sprintf(buf, "BEGIN_MATRIX %s\r\n", szName);
3789 sDescription += buf;
3791 if (!m_bUseConstants) {
3792 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
3793 m_e[0], m_e[1], m_e[2]);
3794 sDescription += buf;
3795 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
3796 m_e[3], m_e[4], m_e[5]);
3797 sDescription += buf;
3798 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n",
3799 m_e[6], m_e[7], m_e[8]);
3800 sDescription += buf;
3803 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
3804 m_e[0], m_e[1], m_e[2], m_e[9]);
3805 sDescription += buf;
3806 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
3807 m_e[3], m_e[4], m_e[5], m_e[10]);
3808 sDescription += buf;
3809 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\r\n",
3810 m_e[6], m_e[7], m_e[8], m_e[11]);
3811 sDescription += buf;
3813 ! sDescription += "\r\n";
3821 ! sprintf(buf, "BEGIN_MATRIX %s\n", szName);
3822 sDescription += buf;
3824 if (!m_bUseConstants) {
3825 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
3826 m_e[0], m_e[1], m_e[2]);
3827 sDescription += buf;
3828 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
3829 m_e[3], m_e[4], m_e[5]);
3830 sDescription += buf;
3831 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n",
3832 m_e[6], m_e[7], m_e[8]);
3833 sDescription += buf;
3836 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
3837 m_e[0], m_e[1], m_e[2], m_e[9]);
3838 sDescription += buf;
3839 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
3840 m_e[3], m_e[4], m_e[5], m_e[10]);
3841 sDescription += buf;
3842 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf + %8.4lf\n",
3843 m_e[6], m_e[7], m_e[8], m_e[11]);
3844 sDescription += buf;
3846 ! sDescription += "\n";
3852 if (m_e[0]!=1.0 || m_e[4]!=1.0 || m_e[9]!=1.0 || sum!=3.0) {
3853 sReport += icValidateNonCompliantMsg;
3854 sReport += sSigName;
3855 ! sReport += " - Matrix must be identity.\r\n";
3856 rv = icValidateNonCompliant;
3860 if (m_e[0]!=1.0 || m_e[4]!=1.0 || m_e[9]!=1.0 || sum!=3.0) {
3861 sReport += icValidateNonCompliantMsg;
3862 sReport += sSigName;
3863 ! sReport += " - Matrix must be identity.\n";
3864 rv = icValidateNonCompliant;
3870 ptr += sprintf(ptr, " %s", m_pVal);
3872 ! strcpy(ptr, "\r\n");
3873 sDescription += (const icChar*)m_pOutText;
3878 ptr += sprintf(ptr, " %s", m_pVal);
3880 ! strcpy(ptr, "\n");
3881 sDescription += (const icChar*)m_pOutText;
3886 icChar szOutText[2048], szColor[40];
3889 ! sprintf(szOutText, "BEGIN_LUT %s %d %d\r\n", szName, m_nInput, m_nOutput);
3890 sDescription += szOutText;
3892 for (i=0; i<m_nInput; i++) {
3894 icChar szOutText[2048], szColor[40];
3897 ! sprintf(szOutText, "BEGIN_LUT %s %d %d\n", szName, m_nInput, m_nOutput);
3898 sDescription += szOutText;
3900 for (i=0; i<m_nInput; i++) {
3903 sDescription += szOutText;
3906 ! sDescription += "\r\n";
3909 for (i=0; i<m_nInput; i++) {
3911 sDescription += szOutText;
3914 ! sDescription += "\n";
3917 for (i=0; i<m_nInput; i++) {
3921 Iterate(sDescription, 0, 0);
3923 ! sDescription += "\r\n";
3929 Iterate(sDescription, 0, 0);
3931 ! sDescription += "\n";
3937 if (m_nReserved2[0]!=0 || m_nReserved2[1]!=0 || m_nReserved2[2]!=0) {
3938 sReport += icValidateNonCompliantMsg;
3939 sReport += sSigName;
3940 ! sReport += " - Reserved Value must be zero.\r\n";
3942 rv = icValidateNonCompliant;
3945 if (m_nReserved2[0]!=0 || m_nReserved2[1]!=0 || m_nReserved2[2]!=0) {
3946 sReport += icValidateNonCompliantMsg;
3947 sReport += sSigName;
3948 ! sReport += " - Reserved Value must be zero.\n";
3950 rv = icValidateNonCompliant;
3954 if (m_GridPoints[i]<2) {
3955 sReport += icValidateCriticalErrorMsg;
3956 sReport += sSigName;
3957 ! sprintf(temp, " - CLUT: At least 2 grid points should be present in dimension %u.\r\n",i );
3959 rv = icMaxStatus(rv, icValidateCriticalError);
3962 if (m_GridPoints[i]<2) {
3963 sReport += icValidateCriticalErrorMsg;
3964 sReport += sSigName;
3965 ! sprintf(temp, " - CLUT: At least 2 grid points should be present in dimension %u.\n",i );
3967 rv = icMaxStatus(rv, icValidateCriticalError);
3972 sReport += icValidateWarningMsg;
3973 sReport += sSigName;
3974 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
3975 rv = icMaxStatus(rv, icValidateWarning);
3980 sReport += icValidateWarningMsg;
3981 sReport += sSigName;
3982 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
3983 rv = icMaxStatus(rv, icValidateWarning);
3988 if (m_nInput!=nInput) {
3989 sReport += icValidateCriticalErrorMsg;
3990 sReport += sSigName;
3991 ! sReport += " - Incorrect number of input channels.\r\n";
3992 rv = icMaxStatus(rv, icValidateCriticalError);
3996 if (m_nInput!=nInput) {
3997 sReport += icValidateCriticalErrorMsg;
3998 sReport += sSigName;
3999 ! sReport += " - Incorrect number of input channels.\n";
4000 rv = icMaxStatus(rv, icValidateCriticalError);
4005 if (m_nOutput!=nOutput) {
4006 sReport += icValidateCriticalErrorMsg;
4007 sReport += sSigName;
4008 ! sReport += " - Incorrect number of output channels.\r\n";
4009 rv = icMaxStatus(rv, icValidateCriticalError);
4013 if (m_nOutput!=nOutput) {
4014 sReport += icValidateCriticalErrorMsg;
4015 sReport += sSigName;
4016 ! sReport += " - Incorrect number of output channels.\n";
4017 rv = icMaxStatus(rv, icValidateCriticalError);
4022 if (m_nInput!=nInput) {
4023 sReport += icValidateCriticalErrorMsg;
4024 sReport += sSigName;
4025 ! sReport += " - Incorrect number of input channels.\r\n";
4026 rv = icMaxStatus(rv, icValidateCriticalError);
4030 if (m_nInput!=nInput) {
4031 sReport += icValidateCriticalErrorMsg;
4032 sReport += sSigName;
4033 ! sReport += " - Incorrect number of input channels.\n";
4034 rv = icMaxStatus(rv, icValidateCriticalError);
4039 if (m_nOutput!=nOutput) {
4040 sReport += icValidateCriticalErrorMsg;
4041 sReport += sSigName;
4042 ! sReport += " - Incorrect number of output channels.\r\n";
4043 rv = icMaxStatus(rv, icValidateCriticalError);
4047 if (m_nOutput!=nOutput) {
4048 sReport += icValidateCriticalErrorMsg;
4049 sReport += sSigName;
4050 ! sReport += " - Incorrect number of output channels.\n";
4051 rv = icMaxStatus(rv, icValidateCriticalError);
4056 if (m_nInput!=nInput) {
4057 sReport += icValidateCriticalErrorMsg;
4058 sReport += sSigName;
4059 ! sReport += " - Incorrect number of input channels.\r\n";
4060 rv = icMaxStatus(rv, icValidateCriticalError);
4064 if (m_nInput!=nInput) {
4065 sReport += icValidateCriticalErrorMsg;
4066 sReport += sSigName;
4067 ! sReport += " - Incorrect number of input channels.\n";
4068 rv = icMaxStatus(rv, icValidateCriticalError);
4073 if (m_nOutput!=nOutput) {
4074 sReport += icValidateCriticalErrorMsg;
4075 sReport += sSigName;
4076 ! sReport += " - Incorrect number of output channels.\r\n";
4077 rv = icMaxStatus(rv, icValidateCriticalError);
4081 if (m_nOutput!=nOutput) {
4082 sReport += icValidateCriticalErrorMsg;
4083 sReport += sSigName;
4084 ! sReport += " - Incorrect number of output channels.\n";
4085 rv = icMaxStatus(rv, icValidateCriticalError);
4091 sReport += icValidateCriticalErrorMsg;
4092 sReport += sSigName;
4093 ! sReport += " - CLUT must be present.\r\n";
4094 rv = icMaxStatus(rv, icValidateCriticalError);
4099 sReport += icValidateCriticalErrorMsg;
4100 sReport += sSigName;
4101 ! sReport += " - CLUT must be present.\n";
4102 rv = icMaxStatus(rv, icValidateCriticalError);
4108 sReport += icValidateCriticalErrorMsg;
4109 sReport += sSigName;
4110 ! sReport += " - Incorrect number of B-curves.\r\n";
4111 rv = icMaxStatus(rv, icValidateCriticalError);
4116 sReport += icValidateCriticalErrorMsg;
4117 sReport += sSigName;
4118 ! sReport += " - Incorrect number of B-curves.\n";
4119 rv = icMaxStatus(rv, icValidateCriticalError);
4125 sReport += icValidateCriticalErrorMsg;
4126 sReport += sSigName;
4127 ! sReport += " - Incorrect number of M-curves.\r\n";
4128 rv = icMaxStatus(rv, icValidateCriticalError);
4133 sReport += icValidateCriticalErrorMsg;
4134 sReport += sSigName;
4135 ! sReport += " - Incorrect number of M-curves.\n";
4136 rv = icMaxStatus(rv, icValidateCriticalError);
4142 sReport += icValidateNonCompliantMsg;
4143 sReport += sSigName;
4144 ! sReport += " - CLUT must be present if using A-curves.\r\n";
4146 rv = icMaxStatus(rv, icValidateNonCompliant);
4150 sReport += icValidateNonCompliantMsg;
4151 sReport += sSigName;
4152 ! sReport += " - CLUT must be present if using A-curves.\n";
4154 rv = icMaxStatus(rv, icValidateNonCompliant);
4159 sReport += icValidateCriticalErrorMsg;
4160 sReport += sSigName;
4161 ! sReport += " - Incorrect number of A-curves.\r\n";
4162 rv = icMaxStatus(rv, icValidateCriticalError);
4167 sReport += icValidateCriticalErrorMsg;
4168 sReport += sSigName;
4169 ! sReport += " - Incorrect number of A-curves.\n";
4170 rv = icMaxStatus(rv, icValidateCriticalError);
4176 sReport += icValidateWarningMsg;
4177 sReport += sSigName;
4178 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\r\n";
4179 rv = icMaxStatus(rv, icValidateCriticalError);
4184 sReport += icValidateWarningMsg;
4185 sReport += sSigName;
4186 ! sReport += " - Tag validation incomplete: Pointer to profile unavailable.\n";
4187 rv = icMaxStatus(rv, icValidateCriticalError);
4192 if (m_nOutput!=nOutput) {
4193 sReport += icValidateCriticalErrorMsg;
4194 sReport += sSigName;
4195 ! sReport += " - Incorrect number of output channels.\r\n";
4196 rv = icMaxStatus(rv, icValidateCriticalError);
4200 if (m_nOutput!=nOutput) {
4201 sReport += icValidateCriticalErrorMsg;
4202 sReport += sSigName;
4203 ! sReport += " - Incorrect number of output channels.\n";
4204 rv = icMaxStatus(rv, icValidateCriticalError);
4210 sReport += icValidateCriticalErrorMsg;
4211 sReport += sSigName;
4212 ! sReport += " - Incorrect number of B-curves.\r\n";
4213 rv = icMaxStatus(rv, icValidateCriticalError);
4218 sReport += icValidateCriticalErrorMsg;
4219 sReport += sSigName;
4220 ! sReport += " - Incorrect number of B-curves.\n";
4221 rv = icMaxStatus(rv, icValidateCriticalError);
4227 sReport += icValidateCriticalErrorMsg;
4228 sReport += sSigName;
4229 ! sReport += " - Incorrect number of M-curves.\r\n";
4230 rv = icMaxStatus(rv, icValidateCriticalError);
4235 sReport += icValidateCriticalErrorMsg;
4236 sReport += sSigName;
4237 ! sReport += " - Incorrect number of M-curves.\n";
4238 rv = icMaxStatus(rv, icValidateCriticalError);
4244 sReport += icValidateNonCompliantMsg;
4245 sReport += sSigName;
4246 ! sReport += " - CLUT must be present if using A-curves.\r\n";
4248 rv = icMaxStatus(rv, icValidateNonCompliant);
4252 sReport += icValidateNonCompliantMsg;
4253 sReport += sSigName;
4254 ! sReport += " - CLUT must be present if using A-curves.\n";
4256 rv = icMaxStatus(rv, icValidateNonCompliant);
4261 sReport += icValidateCriticalErrorMsg;
4262 sReport += sSigName;
4263 ! sReport += " - Incorrect number of A-curves.\r\n";
4264 rv = icMaxStatus(rv, icValidateCriticalError);
4269 sReport += icValidateCriticalErrorMsg;
4270 sReport += sSigName;
4271 ! sReport += " - Incorrect number of A-curves.\n";
4272 rv = icMaxStatus(rv, icValidateCriticalError);
4277 if (pTagCurve->GetSize()==1) {
4278 sReport += icValidateCriticalErrorMsg;
4279 sReport += sSigName;
4280 ! sReport += " - lut8Tags do not support single entry gamma curves.\r\n";
4281 rv = icMaxStatus(rv, icValidateCriticalError);
4285 if (pTagCurve->GetSize()==1) {
4286 sReport += icValidateCriticalErrorMsg;
4287 sReport += sSigName;
4288 ! sReport += " - lut8Tags do not support single entry gamma curves.\n";
4289 rv = icMaxStatus(rv, icValidateCriticalError);
4295 sReport += icValidateCriticalErrorMsg;
4296 sReport += sSigName;
4297 ! sReport += " - Incorrect number of B-curves.\r\n";
4298 rv = icMaxStatus(rv, icValidateCriticalError);
4303 sReport += icValidateCriticalErrorMsg;
4304 sReport += sSigName;
4305 ! sReport += " - Incorrect number of B-curves.\n";
4306 rv = icMaxStatus(rv, icValidateCriticalError);
4311 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4312 sReport += icValidateWarningMsg;
4313 sReport += sSigName;
4314 ! sReport += " - Matrix must be identity.\r\n";
4315 rv = icMaxStatus(rv, icValidateWarning);
4319 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4320 sReport += icValidateWarningMsg;
4321 sReport += sSigName;
4322 ! sReport += " - Matrix must be identity.\n";
4323 rv = icMaxStatus(rv, icValidateWarning);
4328 if (pTagCurve->GetSize()==1) {
4329 sReport += icValidateCriticalErrorMsg;
4330 sReport += sSigName;
4331 ! sReport += " - lut8Tags do not support single entry gamma curves.\r\n";
4332 rv = icMaxStatus(rv, icValidateCriticalError);
4336 if (pTagCurve->GetSize()==1) {
4337 sReport += icValidateCriticalErrorMsg;
4338 sReport += sSigName;
4339 ! sReport += " - lut8Tags do not support single entry gamma curves.\n";
4340 rv = icMaxStatus(rv, icValidateCriticalError);
4346 sReport += icValidateCriticalErrorMsg;
4347 sReport += sSigName;
4348 ! sReport += " - Incorrect number of A-curves.\r\n";
4349 rv = icMaxStatus(rv, icValidateCriticalError);
4354 sReport += icValidateCriticalErrorMsg;
4355 sReport += sSigName;
4356 ! sReport += " - Incorrect number of A-curves.\n";
4357 rv = icMaxStatus(rv, icValidateCriticalError);
4362 if (pTagCurve->GetSize()==1) {
4363 sReport += icValidateCriticalErrorMsg;
4364 sReport += sSigName;
4365 ! sReport += " - lut16Tags do not support single entry gamma curves.\r\n";
4366 rv = icMaxStatus(rv, icValidateCriticalError);
4370 if (pTagCurve->GetSize()==1) {
4371 sReport += icValidateCriticalErrorMsg;
4372 sReport += sSigName;
4373 ! sReport += " - lut16Tags do not support single entry gamma curves.\n";
4374 rv = icMaxStatus(rv, icValidateCriticalError);
4380 sReport += icValidateCriticalErrorMsg;
4381 sReport += sSigName;
4382 ! sReport += " - Incorrect number of B-curves.\r\n";
4383 rv = icMaxStatus(rv, icValidateCriticalError);
4388 sReport += icValidateCriticalErrorMsg;
4389 sReport += sSigName;
4390 ! sReport += " - Incorrect number of B-curves.\n";
4391 rv = icMaxStatus(rv, icValidateCriticalError);
4396 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4397 sReport += icValidateWarningMsg;
4398 sReport += sSigName;
4399 ! sReport += " - Matrix must be identity.\r\n";
4400 rv = icMaxStatus(rv, icValidateWarning);
4404 if (m_XYZMatrix[0]!=1.0 || m_XYZMatrix[4]!=1.0 || m_XYZMatrix[9]!=1.0 || sum!=3.0) {
4405 sReport += icValidateWarningMsg;
4406 sReport += sSigName;
4407 ! sReport += " - Matrix must be identity.\n";
4408 rv = icMaxStatus(rv, icValidateWarning);
4413 if (pTagCurve->GetSize()==1) {
4414 sReport += icValidateCriticalErrorMsg;
4415 sReport += sSigName;
4416 ! sReport += " - lut16Tags do not support single entry gamma curves.\r\n";
4417 rv = icMaxStatus(rv, icValidateCriticalError);
4421 if (pTagCurve->GetSize()==1) {
4422 sReport += icValidateCriticalErrorMsg;
4423 sReport += sSigName;
4424 ! sReport += " - lut16Tags do not support single entry gamma curves.\n";
4425 rv = icMaxStatus(rv, icValidateCriticalError);
4431 sReport += icValidateCriticalErrorMsg;
4432 sReport += sSigName;
4433 ! sReport += " - Incorrect number of A-curves.\r\n";
4434 rv = icMaxStatus(rv, icValidateCriticalError);
4439 sReport += icValidateCriticalErrorMsg;
4440 sReport += sSigName;
4441 ! sReport += " - Incorrect number of A-curves.\n";
4442 rv = icMaxStatus(rv, icValidateCriticalError);
4445 *** misc/SampleICC-1.3.2/IccProfLib/IccTagMPE.cpp Mon Aug 20 22:05:00 2007
4446 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagMPE.cpp Fri Jan 25 14:24:00 2008
4449 icGetSig(sigbuf, m_sig), m_nSize);
4450 sDescription += buf;
4452 ! sDescription += "\r\n\r\nData Follows:\r\n";
4454 icMemDump(sDescription, m_pData, m_nSize);
4457 icGetSig(sigbuf, m_sig), m_nSize);
4458 sDescription += buf;
4460 ! sDescription += "\n\nData Follows:\n";
4462 icMemDump(sDescription, m_pData, m_nSize);
4466 sReport += " - Contains unknown processing element type (";
4467 icGetSig(buf, m_sig, true);
4469 ! sReport += ").\r\n";
4471 return icValidateCriticalError;
4474 sReport += " - Contains unknown processing element type (";
4475 icGetSig(buf, m_sig, true);
4477 ! sReport += ").\n";
4479 return icValidateCriticalError;
4483 sReport += " - Element ";
4484 sSigName = Info.GetSigName(GetType());
4485 sReport += sSigName;
4486 ! sReport += " - Reserved Value must be zero.\r\n";
4488 rv = icValidateNonCompliant;
4491 sReport += " - Element ";
4492 sSigName = Info.GetSigName(GetType());
4493 sReport += sSigName;
4494 ! sReport += " - Reserved Value must be zero.\n";
4496 rv = icValidateNonCompliant;
4503 ! sprintf(buf, "BEGIN MULTI_PROCESS_ELEMENT_TAG %d %d\r\n", m_nInputChannels, m_nOutputChannels);
4504 sDescription += buf;
4505 ! sDescription += "\r\n";
4507 CIccMultiProcessElementList::iterator i;
4510 for (j=0, i=m_list->begin(); i!=m_list->end(); j++, i++) {
4511 ! sprintf(buf, "PROCESS_ELEMENT #%d\r\n", j+1);
4512 sDescription += buf;
4513 i->ptr->Describe(sDescription);
4514 ! sDescription += "\r\n";
4522 ! sprintf(buf, "BEGIN MULTI_PROCESS_ELEMENT_TAG %d %d\n", m_nInputChannels, m_nOutputChannels);
4523 sDescription += buf;
4524 ! sDescription += "\n";
4526 CIccMultiProcessElementList::iterator i;
4529 for (j=0, i=m_list->begin(); i!=m_list->end(); j++, i++) {
4530 ! sprintf(buf, "PROCESS_ELEMENT #%d\n", j+1);
4531 sDescription += buf;
4532 i->ptr->Describe(sDescription);
4533 ! sDescription += "\n";
4539 if (m_nInputChannels != m_nOutputChannels) {
4540 sReport += icValidateCriticalErrorMsg;
4541 sReport += sSigName;
4542 ! sReport += " No processing elements and input and output channels do not match!\r\n";
4543 return icValidateCriticalError;
4546 sReport += icValidateWarningMsg;
4547 sReport += sSigName;
4548 ! sReport += " No processing elements.\r\n";
4549 return icValidateWarning;
4553 if (m_nInputChannels != m_nOutputChannels) {
4554 sReport += icValidateCriticalErrorMsg;
4555 sReport += sSigName;
4556 ! sReport += " No processing elements and input and output channels do not match!\n";
4557 return icValidateCriticalError;
4560 sReport += icValidateWarningMsg;
4561 sReport += sSigName;
4562 ! sReport += " No processing elements.\n";
4563 return icValidateWarning;
4568 if (i->ptr->NumInputChannels() != m_nInputChannels) {
4569 sReport += icValidateCriticalErrorMsg;
4570 sReport += sSigName;
4571 ! sReport += " Mis-matching number of input channels!\r\n";
4572 return icValidateCriticalError;
4576 if (i->ptr->NumInputChannels() != m_nInputChannels) {
4577 sReport += icValidateCriticalErrorMsg;
4578 sReport += sSigName;
4579 ! sReport += " Mis-matching number of input channels!\n";
4580 return icValidateCriticalError;
4586 sReport += i->ptr->GetClassName();
4588 ! sReport += " Mis-matching number of channels!\r\n";
4589 return icValidateCriticalError;
4594 sReport += i->ptr->GetClassName();
4596 ! sReport += " Mis-matching number of channels!\n";
4597 return icValidateCriticalError;
4602 if (last && last->NumOutputChannels() != m_nOutputChannels) {
4603 sReport += icValidateCriticalErrorMsg;
4604 sReport += sSigName;
4605 ! sReport += " Mis-matching number of output channels!\r\n";
4606 return icValidateCriticalError;
4610 if (last && last->NumOutputChannels() != m_nOutputChannels) {
4611 sReport += icValidateCriticalErrorMsg;
4612 sReport += sSigName;
4613 ! sReport += " Mis-matching number of output channels!\n";
4614 return icValidateCriticalError;
4617 *** misc/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.cpp Mon Aug 20 22:05:00 2007
4618 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.cpp Fri Jan 25 14:24:00 2008
4624 ! sDescription += "ProfileID:\r\n";
4632 ! sDescription += "ProfileID:\n";
4638 sprintf(buf, "%2x", m_profileID.ID8[i]);
4639 sDescription += buf;
4641 ! sDescription += "\r\n";
4643 ! sDescription += "Description:\r\n";
4644 m_desc.Describe(sDescription);
4646 ! sDescription += "\r\n";
4651 sprintf(buf, "%2x", m_profileID.ID8[i]);
4652 sDescription += buf;
4654 ! sDescription += "\n";
4656 ! sDescription += "Description:\n";
4657 m_desc.Describe(sDescription);
4659 ! sDescription += "\n";
4668 ! sprintf(buf, "BEGIN ProfileSequenceIdentification_TAG\r\n");
4669 sDescription += buf;
4670 ! sDescription += "\r\n";
4673 CIccProfileIdDescList::iterator j;
4674 for (i=0, j=m_list->begin(); j!=m_list->end(); i++, j++) {
4675 ! sprintf(buf, "ProfileDescription_%d:\r\n", i+1);
4676 sDescription += buf;
4677 j->Describe(sDescription);
4680 ! sprintf(buf, "END ProfileSequenceIdentification_TAG\r\n");
4681 sDescription += buf;
4682 ! sDescription += "\r\n";
4690 ! sprintf(buf, "BEGIN ProfileSequenceIdentification_TAG\n");
4691 sDescription += buf;
4692 ! sDescription += "\n";
4695 CIccProfileIdDescList::iterator j;
4696 for (i=0, j=m_list->begin(); j!=m_list->end(); i++, j++) {
4697 ! sprintf(buf, "ProfileDescription_%d:\n", i+1);
4698 sDescription += buf;
4699 j->Describe(sDescription);
4702 ! sprintf(buf, "END ProfileSequenceIdentification_TAG\n");
4703 sDescription += buf;
4704 ! sDescription += "\n";
4708 *** misc/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.h Mon Aug 20 22:05:00 2007
4709 --- misc/build/SampleICC-1.3.2/IccProfLib/IccTagProfSeqId.h Fri Jan 25 14:24:00 2008
4715 ! #endif //_ICCTAGPROFSEQID_H
4720 ! #endif //_ICCTAGPROFSEQID_H
4721 *** misc/SampleICC-1.3.2/IccProfLib/IccUtil.cpp Mon Aug 20 22:05:00 2007
4722 --- misc/build/SampleICC-1.3.2/IccProfLib/IccUtil.cpp Fri Jan 25 14:27:16 2008
4725 #include "IccUtil.h"
4726 #include "IccTagFactory.h"
4728 ! #include <memory.h>
4733 #include "IccUtil.h"
4734 #include "IccTagFactory.h"
4745 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[0]), icFtoD(pMatrix[1]), icFtoD(pMatrix[2]));
4747 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[3]), icFtoD(pMatrix[4]), icFtoD(pMatrix[5]));
4749 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\r\n", icFtoD(pMatrix[6]), icFtoD(pMatrix[7]), icFtoD(pMatrix[8]));
4757 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[0]), icFtoD(pMatrix[1]), icFtoD(pMatrix[2]));
4759 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[3]), icFtoD(pMatrix[4]), icFtoD(pMatrix[5]));
4761 ! sprintf(buf, "%8.4lf %8.4lf %8.4lf\n", icFtoD(pMatrix[6]), icFtoD(pMatrix[7]), icFtoD(pMatrix[8]));
4769 sReport += icValidateNonCompliantMsg;
4770 ! sReport += " - XYZNumber: Negative X value!\r\n";
4771 rv = icValidateNonCompliant;
4775 sReport += icValidateNonCompliantMsg;
4776 ! sReport += " - XYZNumber: Negative Y value!\r\n";
4777 rv = icMaxStatus(rv, icValidateNonCompliant);
4781 sReport += icValidateNonCompliantMsg;
4782 ! sReport += " - XYZNumber: Negative Z value!\r\n";
4783 rv = icMaxStatus(rv, icValidateNonCompliant);
4789 sReport += icValidateNonCompliantMsg;
4790 ! sReport += " - XYZNumber: Negative X value!\n";
4791 rv = icValidateNonCompliant;
4795 sReport += icValidateNonCompliantMsg;
4796 ! sReport += " - XYZNumber: Negative Y value!\n";
4797 rv = icMaxStatus(rv, icValidateNonCompliant);
4801 sReport += icValidateNonCompliantMsg;
4802 ! sReport += " - XYZNumber: Negative Z value!\n";
4803 rv = icMaxStatus(rv, icValidateNonCompliant);
4809 if (dateTime.year<1992) {
4810 sReport += icValidateWarningMsg;
4811 ! sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
4813 rv = icValidateWarning;
4817 if (dateTime.year<1992) {
4818 sReport += icValidateWarningMsg;
4819 ! sprintf(buf," - %u: Invalid year!\n",dateTime.year);
4821 rv = icValidateWarning;
4825 if (newtime->tm_mon==11 && newtime->tm_mday==31) {
4826 if (dateTime.year>(year+1)) {
4827 sReport += icValidateWarningMsg;
4828 ! sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
4830 rv = icMaxStatus(rv, icValidateWarning);
4833 if (newtime->tm_mon==11 && newtime->tm_mday==31) {
4834 if (dateTime.year>(year+1)) {
4835 sReport += icValidateWarningMsg;
4836 ! sprintf(buf," - %u: Invalid year!\n",dateTime.year);
4838 rv = icMaxStatus(rv, icValidateWarning);
4843 if (dateTime.year>year) {
4844 sReport += icValidateWarningMsg;
4845 ! sprintf(buf," - %u: Invalid year!\r\n",dateTime.year);
4847 rv = icMaxStatus(rv, icValidateWarning);
4851 if (dateTime.year>year) {
4852 sReport += icValidateWarningMsg;
4853 ! sprintf(buf," - %u: Invalid year!\n",dateTime.year);
4855 rv = icMaxStatus(rv, icValidateWarning);
4860 if (dateTime.month<1 || dateTime.month>12) {
4861 sReport += icValidateWarningMsg;
4862 ! sprintf(buf," - %u: Invalid month!\r\n",dateTime.month);
4864 rv = icMaxStatus(rv, icValidateWarning);
4868 if (dateTime.month<1 || dateTime.month>12) {
4869 sReport += icValidateWarningMsg;
4870 ! sprintf(buf," - %u: Invalid month!\n",dateTime.month);
4872 rv = icMaxStatus(rv, icValidateWarning);
4877 if (dateTime.day<1 || dateTime.day>31) {
4878 sReport += icValidateWarningMsg;
4879 ! sprintf(buf," - %u: Invalid day!\r\n",dateTime.day);
4881 rv = icMaxStatus(rv, icValidateWarning);
4885 if (dateTime.day<1 || dateTime.day>31) {
4886 sReport += icValidateWarningMsg;
4887 ! sprintf(buf," - %u: Invalid day!\n",dateTime.day);
4889 rv = icMaxStatus(rv, icValidateWarning);
4893 if (dateTime.month==2) {
4894 if (dateTime.day>29) {
4895 sReport += icValidateWarningMsg;
4896 ! sprintf(buf," - %u: Invalid day for February!\r\n",dateTime.day);
4898 rv = icMaxStatus(rv, icValidateWarning);
4901 if (dateTime.month==2) {
4902 if (dateTime.day>29) {
4903 sReport += icValidateWarningMsg;
4904 ! sprintf(buf," - %u: Invalid day for February!\n",dateTime.day);
4906 rv = icMaxStatus(rv, icValidateWarning);
4910 if (dateTime.day==29) {
4911 if ((dateTime.year%4)!=0) {
4912 sReport += icValidateWarningMsg;
4913 ! sprintf(buf," - %u: Invalid day for February, year is not a leap year(%u)!\r\n",dateTime.day, dateTime.year);
4915 rv = icMaxStatus(rv, icValidateWarning);
4918 if (dateTime.day==29) {
4919 if ((dateTime.year%4)!=0) {
4920 sReport += icValidateWarningMsg;
4921 ! sprintf(buf," - %u: Invalid day for February, year is not a leap year(%u)!\n",dateTime.day, dateTime.year);
4923 rv = icMaxStatus(rv, icValidateWarning);
4928 if (dateTime.hours>23) {
4929 sReport += icValidateWarningMsg;
4930 ! sprintf(buf," - %u: Invalid hour!\r\n",dateTime.hours);
4932 rv = icMaxStatus(rv, icValidateWarning);
4936 if (dateTime.hours>23) {
4937 sReport += icValidateWarningMsg;
4938 ! sprintf(buf," - %u: Invalid hour!\n",dateTime.hours);
4940 rv = icMaxStatus(rv, icValidateWarning);
4945 if (dateTime.minutes>59) {
4946 sReport += icValidateWarningMsg;
4947 ! sprintf(buf," - %u: Invalid minutes!\r\n",dateTime.minutes);
4949 rv = icMaxStatus(rv, icValidateWarning);
4953 if (dateTime.minutes>59) {
4954 sReport += icValidateWarningMsg;
4955 ! sprintf(buf," - %u: Invalid minutes!\n",dateTime.minutes);
4957 rv = icMaxStatus(rv, icValidateWarning);
4962 if (dateTime.seconds>59) {
4963 sReport += icValidateWarningMsg;
4964 ! sprintf(buf," - %u: Invalid seconds!\r\n",dateTime.hours);
4966 rv = icMaxStatus(rv, icValidateWarning);
4970 if (dateTime.seconds>59) {
4971 sReport += icValidateWarningMsg;
4972 ! sprintf(buf," - %u: Invalid seconds!\n",dateTime.hours);
4974 rv = icMaxStatus(rv, icValidateWarning);
4976 *** misc/SampleICC-1.3.2/IccProfLib/icProfileHeader.h Mon Aug 20 22:05:00 2007
4977 --- misc/build/SampleICC-1.3.2/IccProfLib/icProfileHeader.h Fri Jan 25 14:24:00 2008
4981 icFlare0 = 0x00000000, /* 0% flare */
4982 icFlare100 = 0x00000001, /* 100% flare */
4983 } icMeasurementFlare;
4985 /** Convenience Enum Definition - Not defined in ICC specification*/
4986 ! #define icMaxEnumFlare ((icMeasurementFlare) 0xFFFFFFFF)
4987 #define icMaxFlare ((icMeasurementFlare) 0xFFFFFFFF) /* as defined by earlier versions */
4992 icFlare0 = 0x00000000, /* 0% flare */
4993 icFlare100 = 0x00000001, /* 100% flare */
4994 + icMaxEnumFlare = 0xFFFFFFFF
4995 } icMeasurementFlare;
4997 /** Convenience Enum Definition - Not defined in ICC specification*/
4998 ! /*#define icMaxEnumFlare ((icMeasurementFlare) 0xFFFFFFFF)*/
4999 #define icMaxFlare ((icMeasurementFlare) 0xFFFFFFFF) /* as defined by earlier versions */
5002 *** misc/SampleICC-1.3.2/Tools/CmdLine/Makefile.in Mon Aug 20 22:10:42 2007
5003 --- misc/build/SampleICC-1.3.2/Tools/CmdLine/Makefile.in Fri Jan 25 14:24:00 2008
5006 am__quote = @am__quote@
5007 install_sh = @install_sh@
5009 ! SUBDIRS = IccApplyNamedCmm \
5010 ! @SICC_ICC_APPLY_PROFILES@ \
5013 IccStripUnknownTags \
5017 ! DIST_SUBDIRS = IccApplyNamedCmm \
5018 ! IccApplyProfiles \
5021 IccStripUnknownTags \
5024 am__quote = @am__quote@
5025 install_sh = @install_sh@
5027 ! SUBDIRS = IccDumpProfile \
5029 IccStripUnknownTags \
5033 ! DIST_SUBDIRS = IccDumpProfile \
5035 IccStripUnknownTags \
5037 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp 2007-08-20 22:04:53.000000000 +0200
5038 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/CLUT.cpp 2008-01-31 13:53:16.000000000 +0100
5043 //////////////////////////////////////////////////////////////////////
5045 + #include <stdlib.h>
5046 + #include <string.h>
5050 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h 2007-08-20 22:04:54.000000000 +0200
5051 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/ICC_tool_exception.h 2008-01-31 13:54:51.000000000 +0100
5055 #ifndef __DEFINED_ICC_TOOL_EXCEPTION_H__
5056 #define __DEFINED_ICC_TOOL_EXCEPTION_H__
5058 + #include <string.h>
5059 #include <exception>
5062 *** misc/SampleICC-1.3.2/IccProfLib/IccCmm.cpp 2007-08-20 22:05:00.000000000 +0200
5063 --- misc/build/SampleICC-1.3.2/IccProfLib/IccCmm.cpp 2008-01-31 13:49:54.000000000 +0100
5067 #pragma warning( disable: 4786) //disable warning in <list.h>
5070 + #include <stdlib.h>
5071 + #include <string.h>
5075 *** misc/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h 2007-08-20 22:04:53.000000000 +0200
5076 --- misc/build/SampleICC-1.3.2/Contrib/ICC_utils/Vetters.h 2008-01-31 14:05:58.000000000 +0100
5081 #include <sys/types.h>
5082 #include <sys/stat.h>
5083 + #include <stdlib.h>
5086 typedef unsigned short mode_t;