Added handling for header/footer images with different resolutions.

Issue #133