~ubuntu-branches/ubuntu/trusty/gimp/trusty

« back to all changes in this revision

Viewing changes to app/base/levels.c

  • Committer: Bazaar Package Importer
  • Author(s): Ari Pollak
  • Date: 2009-08-14 09:57:17 UTC
  • mto: (1.1.21 upstream) (0.1.5 squeeze)
  • mto: This revision was merged to the branch mainline in revision 48.
  • Revision ID: james.westby@ubuntu.com-20090814095717-37dh2xqy5t0rurpk
ImportĀ upstreamĀ versionĀ 2.6.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
          inten = (gdouble) (255.0 * inten - levels->low_input[j]);
92
92
        }
93
93
 
 
94
      /* clamp to new black and white points */
 
95
      inten = CLAMP (inten, 0.0, 1.0);
 
96
 
94
97
      if (levels->gamma[j] != 0.0)
95
98
        {
96
 
          if (inten >= 0.0)
97
 
            inten =  pow ( inten, (1.0 / levels->gamma[j]));
98
 
          else
99
 
            inten = -pow (-inten, (1.0 / levels->gamma[j]));
 
99
          inten =  pow ( inten, (1.0 / levels->gamma[j]));
100
100
        }
101
101
 
102
102
      /*  determine the output intensity  */