Handle 180 degrees image rotation

I wanted to be able to rotate by 180 degrees directly (i.e. without having to perform two 90 degrees rotations).