PEP368 and pixeliterators

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Fri Jul 3 04:21:09 EDT 2009


On Thu, 02 Jul 2009 10:32:04 +0200, Joachim Strömbergson wrote:

> for pixel in rgb_image:
>     # swap red and blue, and set green to 0 pixel.value = pixel.b, 0,
>     pixel.r
> 
> 
> The idea I'm having is that fundamentally the image is made up of a 2D
> array of pixels, not rows of pixels.

A 2D array implies rows (and columns) of pixels.




-- 
Steven



More information about the Python-list mailing list