~ubuntu-branches/debian/squeeze/python-imaging/squeeze

« back to all changes in this revision

Viewing changes to libImaging/Blend.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-11-20 19:22:59 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20091120192259-n3iy0f17n5akogom
Tags: 1.1.7-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* 
2
2
 * The Python Imaging Library
3
 
 * $Id: Blend.c 2134 2004-10-06 08:55:20Z fredrik $
 
3
 * $Id$
4
4
 *
5
5
 * interpolate between two existing images
6
6
 *
63
63
            UINT8* in2 = (UINT8*) imIn2->image[y];
64
64
            UINT8* out = (UINT8*) imOut->image[y];
65
65
            for (x = 0; x < imIn1->linesize; x++) {
66
 
                float temp =
 
66
                float temp = (float)
67
67
                    ((int) in1[x] + alpha * ((int) in2[x] - (int) in1[x]));
68
68
                if (temp <= 0.0)
69
69
                    out[x] = 0;