Rotate an image: where is the bug in my code?

Printable View