Aspect ratio correction for images