Almost none of our internal colorspaces are understood by the PNG or JPG format for example (but all are understood by IM when read back in the MIFF format). This fact would not change at all.fmw42 wrote:If I understand you correctly, you want a new colorspace lineargray or some such thing. But this would only be understood internally by IM. I do not believe any image format would know what to do with that (lineargray named) colorspace. Glennrp can correct me.
We need this internally so that our internal processing will behave as expected, especially when converting from grayscale to a color colorspace, so that IM knows whether gamma compression is needed as part of the conversion or not.
rec709luminance is not the name of a colorspace in IM; if it were then I would have the colorspace i want (although its name would not be ideal in my opinion).fmw42 wrote:It appears that -grayscale rec709luminance is what you want, but you want it to be called something like lineargray.
IM can handle it but it isn't doing so. It's much cleaner to use the colorspace to identify whether the grayscale data represents linear or sRGB-nonlinear for example, rather than only relying on gamma, which is not done for the color colorspaces. Glennrp seems to be on the same page on this one based on his prev reply.fmw42 wrote: Since it is currently labeled gray with gamma=1, those image formats that can deal with it are fine and internally IM can handle it.
As I said, once the conversions are applied correctly (which involves a different set of coefficients), rec709luminance values should be numerically identical to rec601luminance values.fmw42 wrote: The only issue I see is that IM may not know the difference between gray gamma=1 from rec709luminance and gray gamma=1 from rec601luminance.
The problem you are referring to already exists for the linear RGB colorspace (we can't tell whether it's RGB based on rec601 or rec709 primaries) but is no longer a problem after combined into a single linearw luminance channel. As RGB values they are not the same because of different primary chromaticities but *after* they are combined into Y that difference no longer has an effect.