Fastest Way To Loop Through Every Pixel

Casey Hawthorne caseyhHAMMER_TIME at istar.ca
Thu Jul 27 22:52:14 EDT 2006


Have you tried PIL? (Python Imaging Library)

"Chaos" <psnim2000 at gmail.com> wrote:

>As my first attempt to loop through every pixel of an image, I used
>
>        for thisY in range(0, thisHeight):
>            for thisX in range(0, thisWidth):
>                  #Actions here for Pixel thisX, thisY
>
>But it takes 450-1000 milliseconds
>
>I want speeds less than 10 milliseconds
>
>I have tried using SWIG, and pypy but they all are unsuccessfull in
>compiling my files.
--
Regards,
Casey



More information about the Python-list mailing list