I get this error:
TypeError: unsupported operand type(s) for +=: 'int' and 'tuple'
Line 37
http://pastebin.com/LhMS9Xhx
filter = [[1,1,1],[1,1,1],[1,1,1]]
activefield = [[1,2,3],[4,5,6],[7,8,9]]
newvalue = 0
newvalue+= filter[iii][jjj]*aktuellesFeld[iii][jjj]
Line 37 is
aktuellesFeld[iii][jjj] = im.getpixel((...))is a tuple such as:Multiplying by a float (like
filter[iii][jjj]) concatenates copies of the tuple:But
neuerGrauwertis anint. And you can not add atupleto anint.