Revert plug-ins: fix bad parsing of PSD blending modes

This is a manual revert of eac1df4b61
since other changes were made to the same lines.

Although using legacy layer modes for several blend modes improves
compatibility with Photoshop, we found out during testing of the
image from issue #10498, that it negatively impacts loading of PSD's
that use Blend Clipped Layers as Group.
We convert this specific PSD setting by adding a layer group and
setting Composite Mode to Blend to Background.
However, our legacy layer modes do not support Composite Mode, meaning
that PSD's using this can show up using smeared colors.

Since this hasn't been in a release yet, let's revert this and rethink
how we want to handle the combination of these PSD settings.
This commit is contained in:
Jacob Boerema 2023-12-26 11:31:25 -05:00
parent 051f443f1f
commit f8bdca24aa
1 changed files with 12 additions and 12 deletions

View File

@ -59,42 +59,42 @@ static const LayerModeMapping layer_mode_map[] =
/* Name PSD GIMP Exact? */
/* Normal (ps3) */
{ "Normal", "norm", GIMP_LAYER_MODE_NORMAL_LEGACY, TRUE },
{ "Normal", "norm", GIMP_LAYER_MODE_NORMAL, TRUE },
{ "Normal", "norm", GIMP_LAYER_MODE_NORMAL_LEGACY, TRUE },
/* Dissolve (ps3) */
{ "Dissolve", "diss", GIMP_LAYER_MODE_DISSOLVE, TRUE },
/* Multiply (ps3) */
{ "Multiply", "mul ", GIMP_LAYER_MODE_MULTIPLY_LEGACY, TRUE },
{ "Multiply", "mul ", GIMP_LAYER_MODE_MULTIPLY, TRUE },
{ "Multiply", "mul ", GIMP_LAYER_MODE_MULTIPLY_LEGACY, TRUE },
/* Screen (ps3) */
{ "Screen", "scrn", GIMP_LAYER_MODE_SCREEN_LEGACY, TRUE },
{ "Screen", "scrn", GIMP_LAYER_MODE_SCREEN, TRUE },
{ "Screen", "scrn", GIMP_LAYER_MODE_SCREEN_LEGACY, TRUE },
/* Overlay (ps3) */
{ "Overlay", "over", GIMP_LAYER_MODE_OVERLAY, TRUE },
/* Difference (ps3) */
{ "Difference", "diff", GIMP_LAYER_MODE_DIFFERENCE_LEGACY, TRUE },
{ "Difference", "diff", GIMP_LAYER_MODE_DIFFERENCE, TRUE },
{ "Difference", "diff", GIMP_LAYER_MODE_DIFFERENCE_LEGACY, TRUE },
/* Linear Dodge (cs2) */
{ "Linear Dodge", "lddg", GIMP_LAYER_MODE_ADDITION_LEGACY, TRUE },
{ "Linear Dodge", "lddg", GIMP_LAYER_MODE_ADDITION, FALSE },
{ "Linear Dodge", "lddg", GIMP_LAYER_MODE_ADDITION_LEGACY, TRUE },
/* Subtract (??) */
{ "Subtract", "fsub", GIMP_LAYER_MODE_SUBTRACT_LEGACY, TRUE },
{ "Subtract", "fsub", GIMP_LAYER_MODE_SUBTRACT, FALSE },
{ "Subtract", "fsub", GIMP_LAYER_MODE_SUBTRACT_LEGACY, TRUE },
/* Darken (ps3) */
{ "Darken", "dark", GIMP_LAYER_MODE_DARKEN_ONLY_LEGACY, TRUE },
{ "Darken", "dark", GIMP_LAYER_MODE_DARKEN_ONLY, TRUE },
{ "Darken", "dark", GIMP_LAYER_MODE_DARKEN_ONLY_LEGACY, TRUE },
/* Lighten (ps3) */
{ "Ligten", "lite", GIMP_LAYER_MODE_LIGHTEN_ONLY_LEGACY, TRUE },
{ "Ligten", "lite", GIMP_LAYER_MODE_LIGHTEN_ONLY, TRUE },
{ "Ligten", "lite", GIMP_LAYER_MODE_LIGHTEN_ONLY_LEGACY, TRUE },
/* Hue (ps3) */
{ "Hue", "hue ", GIMP_LAYER_MODE_LCH_HUE, FALSE },
@ -118,20 +118,20 @@ static const LayerModeMapping layer_mode_map[] =
{ "Luminosity", "lum ", GIMP_LAYER_MODE_LUMINANCE, FALSE },
/* Divide (??) */
{ "Divide", "fdiv", GIMP_LAYER_MODE_DIVIDE_LEGACY, TRUE },
{ "Divide", "fdiv", GIMP_LAYER_MODE_DIVIDE, FALSE },
{ "Divide", "fdiv", GIMP_LAYER_MODE_DIVIDE_LEGACY, TRUE },
/* Color Dodge (ps6) */
{ "Color Dodge", "div ", GIMP_LAYER_MODE_DODGE_LEGACY, TRUE },
{ "Color Dodge", "div ", GIMP_LAYER_MODE_DODGE, FALSE },
{ "Color Dodge", "div ", GIMP_LAYER_MODE_DODGE_LEGACY, TRUE },
/* Color Burn (ps6) */
{ "Color Burn", "idiv", GIMP_LAYER_MODE_BURN_LEGACY, TRUE },
{ "Color Burn", "idiv", GIMP_LAYER_MODE_BURN, FALSE },
{ "Color Burn", "idiv", GIMP_LAYER_MODE_BURN_LEGACY, TRUE },
/* Hard Light (ps3) */
{ "Hard Light", "hLit", GIMP_LAYER_MODE_HARDLIGHT_LEGACY, TRUE },
{ "Hard Light", "hLit", GIMP_LAYER_MODE_HARDLIGHT, TRUE },
{ "Hard Light", "hLit", GIMP_LAYER_MODE_HARDLIGHT_LEGACY, TRUE },
/* Soft Light (ps3) */
{ "Soft Light", "sLit", GIMP_LAYER_MODE_SOFTLIGHT, FALSE },