gimp r25539 - in trunk: . app/base
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r25539 - in trunk: . app/base
- Date: Mon, 28 Apr 2008 15:46:20 +0100 (BST)
Author: neo
Date: Mon Apr 28 14:46:20 2008
New Revision: 25539
URL: http://svn.gnome.org/viewvc/gimp?rev=25539&view=rev
Log:
2008-04-28 Sven Neumann <sven gimp org>
* app/base/hue-saturation.c (hue_saturation): applied patch from
Michael Deal that fixes use of the overlap option (bug #527085).
Modified:
trunk/ChangeLog
trunk/app/base/hue-saturation.c
Modified: trunk/app/base/hue-saturation.c
==============================================================================
--- trunk/app/base/hue-saturation.c (original)
+++ trunk/app/base/hue-saturation.c Mon Apr 28 14:46:20 2008
@@ -167,8 +167,19 @@
if (use_secondary_hue)
{
- r = hs->hue_transfer[hue][r] * primary_intensity +
- hs->hue_transfer[secondary_hue][r] * secondary_intensity;
+ /* find nearest hue on the circle
+ * between primary and secondary hue
+ */
+ gint diff;
+
+ diff = hs->hue_transfer[hue][r] - hs->hue_transfer[secondary_hue][r];
+ if (diff < -127 || diff >= 128)
+ r = (gint) (hs->hue_transfer[hue][r] * primary_intensity +
+ (hs->hue_transfer[secondary_hue][r] + 255) * secondary_intensity) % 255;
+ else
+ r = hs->hue_transfer[hue][r] * primary_intensity +
+ hs->hue_transfer[secondary_hue][r] * secondary_intensity;
+
g = hs->saturation_transfer[hue][g] * primary_intensity +
hs->saturation_transfer[secondary_hue][g] * secondary_intensity;
b = hs->lightness_transfer[hue][b] * primary_intensity +
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]