On Sep 3, 11:00 am, process <[EMAIL PROTECTED]> wrote: > how could I do getpixel once when x and y s changing?
I was not referring to *calling* im.getpixel, I was referring to looking up getpixel as an attribute of im. How? See below. > > anyway I rewrote and saw I did a lot of stupid stuff. this is fast: > def getPixels5(fileName): > im = PIL.Image.open(fileName) > colors = [] > r, c = im.size im_getpixel = im.getpixel > for y in range(0, c): > row = [] > for x in range(0, r): > color = im.getpixel((x,y)) color = im_getpixel((x, y)) > row.append(color) > colors.append(row) > return numpy.array(colors) > > but I don't need it anuyway apparently since there already was such > methods :) -- http://mail.python.org/mailman/listinfo/python-list