optimize the content-aware-resize feature