Fixed an issue where not trimming height resulted in empty images.