Simon Forman wrote: > Chaos 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. > > You could try the PIL package. > > >From the docs at > http://www.pythonware.com/library/pil/handbook/image.htm > > Image.eval(function, image) => image > > Applies the function (which should take one argument) to each pixel in > the given image. If the image has more than one band, the same function > is applied to each band. Note that the function is evaluated once for > each possible pixel value, so you cannot use random components or other > generators. > > HTH, > ~Simon
I have tried PIL. Not only that, but the Image.eval function had no success either. I did some tests and I found out that Image.eval only called the function a certain number of times either 250, or 255. Unless I can find a working example for this function, its impossible to use. -- http://mail.python.org/mailman/listinfo/python-list