fix syntax error for python3 in image.py