Fixed matted so it doesn't crop images

Fixed matted so it doesn't crop images, espacially an issue with very tall images in portrait orientation.

Issue reference #46