How to convert a PIL Image into a numpy array?

You’re not saying how exactly putdata() is not behaving. I’m assuming you’re doing >>> pic.putdata(a) Traceback (most recent call last): File “…blablabla…/PIL/Image.py”, line 1185, in putdata self.im.putdata(data, scale, offset) SystemError: new style getargs format but argument is not a tuple This is because putdata expects a sequence of tuples and you’re giving it a numpy … Read more