Fix a bug on transformed image's aspect ratio.