GNOME Bugzilla – Bug 613838
Error in gimp-hue-saturation PDB call
Last modified: 2010-06-26 23:19:53 UTC
gimp-hue-saturation expects a value -180..180 for hue (this is stated in the PDB docs (color-cmds.c) The call to the core, however is expecting a value from -100..100 (gimp_drawable_hue_saturation.c) where the code is: g_object_set (config, "hue", hue / 100.0, "saturation", saturation / 100.0, "lightness", lightness / 100.0, NULL) Becuase the pdb limits are -180..180 any pdb calls in this range work without an error, but the results are wrong. A value of 50 is really a hue shift of 90degrees, and any specified values above 100 and below -100 do not error, but do nothing. The cleanest way to fix is probably changing the hue_saturation_invoker call in color-cmds.c, but I can;t say what plugins, scripts, etc that this could potentially break. To replicate, Create a solid red image #FF0000 at the scheme console, do a: (gimp-hue-saturation <layerID> ALL-HUES 120 0 0) According to the docs, this should shift the colour to green. It does nothing. (gimp-hue-saturation <layerID> ALL-HUES 66.666 0 0) shifts to green. (gimp-hue-saturation <layerID> ALL-HUES 100 0 0) shifts the hue 180 degrees to cyan. -Rob A>
Fixed in master and 2-6: commit d75e1a94889edfed82a9b4058ede407522ecdc77 Author: Michael Natterer <mitch@gimp.org> Date: Sun Jun 27 01:15:46 2010 +0200 Bug 613838 - Error in gimp-hue-saturation PDB call The "hue" parameter from the PDB is in a [-180..180] range, not in [-100..100]. Note that unlike stated in the bug, this is not an incompatible change, because it simply got broken between 2.4 and 2.6. (cherry picked from commit 2813fce0b8fffee97fff038760aa7a66b1d9d9ec) app/core/gimpdrawable-hue-saturation.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)