/* * Set defaults for a CIEBasedABC color space. This is also used for * CIEBasedDEF and CIEBasedDEFG color spaces. */ static void set_cie_abc_defaults(gs_cie_abc * pabc, void *client_data) { gx_set_common_cie_defaults(&pabc->common, client_data); pabc->RangeABC = Range3_default; pabc->DecodeABC = DecodeABC_default; pabc->MatrixABC = Matrix3_default; }
/* * Constructor for ICCBased color space. As with the other color space * constructors, this provides only minimal initialization. */ int gs_cspace_build_CIEICC( gs_color_space ** ppcspace, void * client_data, gs_memory_t * pmem ) { gs_cie_icc * picc_info; gs_color_space * pcs; /* * The gs_cie_icc_s structure is the only CIE-based color space structure * which accesses additional memory for which it is responsible. We make * use of the finalization procedure to handle this task, so we can use * the generic CIE space build routine (otherwise we would need a * separate build routine that provided its own reference count freeing * procedure). */ picc_info = gx_build_cie_space( ppcspace, &gs_color_space_type_CIEICC, &st_cie_icc, pmem ); if (picc_info == NULL) return_error(gs_error_VMerror); gx_set_common_cie_defaults(&picc_info->common, client_data); /* * Now set the D50 WhitePoint. The above function does not set any * valid WhitepPoint since PostScript always requires this, but ICC * assumes a D50 WhitePoint as a default */ picc_info->common.points.WhitePoint.u = (float)0.9642; /* Profile illuminant - D50 */ picc_info->common.points.WhitePoint.v = 1.0000; picc_info->common.points.WhitePoint.w = (float)0.8249; picc_info->common.install_cspace = gx_install_CIEICC; picc_info->num_components = 0; picc_info->Range = Range4_default; picc_info->instrp = NULL; picc_info->pcs_is_cielab = false; picc_info->picc = NULL; picc_info->plu = NULL; picc_info->pfile = NULL; pcs = *ppcspace; pcs->params.icc.picc_info = picc_info; return 0; }