It's possible to encounter a true 1-channel image if it's coming directly from, say, a float-value AOV or similar. This was not accounted for and would cause issues when saving the image out to a 3 or 4 channel format (wrong values) or when saving out to another 1 channel format (unnecessary usage of luminance weight values). Pull Request: https://projects.blender.org/blender/blender/pulls/111577