|
106 | 106 | * @VIPS_INTENT_RELATIVE: relative colorimetric rendering intent
|
107 | 107 | * @VIPS_INTENT_SATURATION: saturation rendering intent
|
108 | 108 | * @VIPS_INTENT_ABSOLUTE: absolute colorimetric rendering intent
|
| 109 | + * @VIPS_INTENT_AUTO: the rendering intent that the profile suggests |
109 | 110 | *
|
110 | 111 | * The rendering intent. #VIPS_INTENT_ABSOLUTE is best for
|
111 | 112 | * scientific work, #VIPS_INTENT_RELATIVE is usually best for
|
@@ -620,16 +621,18 @@ vips_icc_load_profile_blob(VipsIcc *icc, VipsBlob *blob,
|
620 | 621 | }
|
621 | 622 |
|
622 | 623 | icc->selected_intent = icc->intent;
|
623 |
| - if (!cmsIsIntentSupported(profile, icc->intent, direction)) { |
| 624 | + if (icc->intent == VIPS_INTENT_AUTO || |
| 625 | + !cmsIsIntentSupported(profile, icc->intent, direction)) |
624 | 626 | icc->selected_intent = (VipsIntent) cmsGetHeaderRenderingIntent(
|
625 | 627 | profile);
|
626 | 628 |
|
| 629 | + if (icc->intent != VIPS_INTENT_AUTO && |
| 630 | + icc->selected_intent != icc->intent) |
627 | 631 | g_warning(_("fallback to suggested %s intent, as profile "
|
628 | 632 | "does not support %s %s intent"),
|
629 | 633 | vips_enum_nick(VIPS_TYPE_INTENT, icc->selected_intent),
|
630 | 634 | vips_enum_nick(VIPS_TYPE_INTENT, icc->intent),
|
631 | 635 | direction == LCMS_USED_AS_INPUT ? _("input") : _("output"));
|
632 |
| - } |
633 | 636 |
|
634 | 637 | #ifdef DEBUG
|
635 | 638 | vips_icc_print_profile("loaded from blob to make", profile);
|
|
0 commit comments