Commits

Hakan Ardo  committed e2ccec1

use pixel iterator here aswell

  • Participants
  • Parent commits cbf97e9

Comments (0)

Files changed (1)

File talk/dls2012/demo/image.py

             b = ConstantImage(a.width, a.height, b)
 
         out = a.new(typecode='d')
-        for y in xrange(a.height):
-            for x in xrange(a.width):
-                out[x, y] = op(float(a[x, y]), float(b[x, y]))
+        for x, y in a.indexes():
+            out[x, y] = op(float(a[x, y]), float(b[x, y]))
 
         return out
     return f