Fixed relying on python2 division semantics in image.py

Regular division in python3 always produces floats, but there were a few places in image.py relying on the old python2 division semantics. I've fixed those to use python3's // operator.