gimp r25540 - in branches/gimp-2-4: . app/base
- From: neo svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r25540 - in branches/gimp-2-4: . app/base
- Date: Mon, 28 Apr 2008 15:48:20 +0100 (BST)
Author: neo
Date: Mon Apr 28 14:48:20 2008
New Revision: 25540
URL: http://svn.gnome.org/viewvc/gimp?rev=25540&view=rev
Log:
2008-04-28 Sven Neumann <sven gimp org>
Merged from trunk:
* app/base/hue-saturation.c (hue_saturation): applied patch from
Michael Deal that fixes use of the overlap option (bug #527085).
Modified:
branches/gimp-2-4/ChangeLog
branches/gimp-2-4/app/base/hue-saturation.c
Modified: branches/gimp-2-4/app/base/hue-saturation.c
==============================================================================
--- branches/gimp-2-4/app/base/hue-saturation.c (original)
+++ branches/gimp-2-4/app/base/hue-saturation.c Mon Apr 28 14:48:20 2008
@@ -172,8 +172,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]