Don't try to convert  to string since it might be an WP_Image_Editor instance.
Don't require wpro tmpfile names, allowing wp_save_image_file hook to be called from elsewhere, with less hassle.
Make save_image_file handle WP_Image_Editor objects being passed, too.