Exemplo n.º 1
0
int
gs_push_pdf14trans_device(gs_state * pgs, bool is_pattern)
{
    gs_pdf14trans_params_t params = { 0 };
    cmm_profile_t *icc_profile;
    gsicc_rendering_intents_t rendering_intent;
    int code;
    cmm_dev_profile_t *dev_profile;

    code = dev_proc(pgs->device, get_profile)(pgs->device,  &dev_profile);
    gsicc_extract_profile(GS_UNKNOWN_TAG, dev_profile, &icc_profile,
                          &rendering_intent);

    params.pdf14_op = PDF14_PUSH_DEVICE;
    /*
     * We really only care about the number of spot colors when we have
     * a device which supports spot colors.  With the other devices we use
     * the tint transform function for DeviceN and Separation color spaces
     * and convert spot colors into process colors.
     */
    params.num_spot_colors = get_num_pdf14_spot_colors(pgs);
    params.is_pattern = is_pattern;
    /* If we happen to be in a situation where we are going out to a device
       whose profile is CIELAB then we will need to make sure that we
       do our blending in RGB and convert to CIELAB when we do the put_image
       command */
    if (icc_profile->data_cs == gsCIELAB ||
        icc_profile->islab) {
        params.iccprofile = pgs->icc_manager->default_rgb;
    }
    /* Note: Other parameters not used */
    return gs_state_update_pdf14trans(pgs, &params);
}
Exemplo n.º 2
0
int
gs_push_pdf14trans_device(gs_state * pgs)
{
    gs_pdf14trans_params_t params = { 0 };

    params.pdf14_op = PDF14_PUSH_DEVICE;
    /*
     * We really only care about the number of spot colors when we have
     * a device which supports spot colors.  With the other devices we use
     * the tint transform function for DeviceN and Separation color spaces
     * and convert spot colors into process colors.
     */
    params.num_spot_colors = get_num_pdf14_spot_colors(pgs);
    /* Note: Other parameters not used */
    return gs_state_update_pdf14trans(pgs, &params);
}