jpg-save: if the space of the incoming buffer is gray, force grayscale

parent af369422
Pipeline #105829 passed with stages
in 9 minutes and 39 seconds