Image pep8

Fixes most of the pep8 issue in `image.py`

I am not sure how to deal with the E125 issues that arise from if statements.

@nellev, can you take a look at this?