Fixed errors in image.py introduced from the different handling of division between python 2 and 3