gimp_edit_blend(): doesn't match UI HSV directionality
Submitted by Charles Belov
Link to original bug (#577062)
Description
Please describe the problem: Rather than providing either HSV clockwise hue blends or HSV counterclockwise hue blends, gimp-edit-blend appears to choose a blend direction that avoids crossing the 0 degree hue line (red). I expect to be able to duplicate the functionality for the UI. That is, I expect to be able to request HSV clockwise hue blends or HSV counterclockwise hue blends via script-fu.
Steps to reproduce:
- There are 4 scripts attached. Save them to your script folder.
- Filters > Script-fu > Refresh Scripts.
- Debug > HSV Gradient Test RGB 0 0 255 to 255 0 0.
- Debug > HSV Gradient Test RGB 0 0 255 to 255 0 1.
- Debug > HSV Gradient Test RGB 255 0 0 to 0 0 255.
- Debug > HSV Gradient Test RGB 255 0 1 to 0 0 255.
Actual results: 3-4. Create new images. 3 goes from blue to red via green. 4 goes from blue to near-red via purple. 5-6. Create new images. 5 goes from red to blue via green. 6 goes from red to blue via purple.
Expected results: 3-4. Both images go from blue to red via the same color (green or purple, but not both). 5-6. Both images go from red to blue via the same color (purple or green, but not both, and the opposite color from steps 3-4).
Does this happen every time? Yes
Other information: The procedure browser currently lists the following blend-mode values for gimp-edit-blend:
The type of blend { FG-BG-RGB-MODE (0), FG-BG-HSV-MODE (1), FG-TRANSPARENT-MODE (2), CUSTOM-MODE (3) }
If we assume FG-BG-HSV-MODE (1) has been implemented as HSV with no 0 crossing, then there is a need for FG-BG-HSV-CW-MODE (4) and FG-BG-HSV-CCW-MODE (5). If bug 141927 is implemented, there would also be a need for FG-BG-HSV-SHORT-MODE (6) and FG-BG-HSV-LONG-MODE (7).
Version: 2.6.6