Resize image for save memory usage.