SyntaxFix
Write A Post
Hire A Developer
Questions
If you have numpy installed you can try:
data = numpy.asarray(im)
(I say "try" here, because it's unclear why getdata() isn't working for you, and I don't know whether asarray uses getdata, but it's worth a test.)
getdata()
asarray