Sorry buddy But I just recently tried your code.
I have a properly named "img.png" file but upon pressing the buttons it exits the window. Left press is a special case that throws a message stating that there is an unhandled memory exception error. This looked interesting too.