don't save the image again if no rotation is needed
don't save the image again if no rotation is needed

increase the quality too
fix #2186

elabftw/elabftw,elabftw/elabftw,elabftw/elabftw,elabftw/elabftw,elabftw/elabftw