def blockpoints(pix, coords, size):
 """
 Generator of pixel colors of given block.
 """
 xs, ys = coords
 for x in range(xs,xs+size):
  for y in range(ys,ys+size):
   yield pix[x,y]

 Generator of pixel colors of given block.
 
recipes/Python/576689_Copymove_forgery/recipe-576689.py