Resize with padding to preserve aspect ratio