I found nothing wrong with the code. I run it with two .png images, one with 800x500 doesn't fill the window as expected and then I try another with 1280x800 and it works fine.
You should check the dimensions of your .png image.
NOTE: I just uncommentWindow.size = (1280, 800)
layout.size = (1280, 800)