Fast conversion of PNG into dictionary of coordinate tuples in python