Color managed screenshot portal (or prepare the API for this ability)
At GIMP, we were recently asked by @vladz to port away from deprecated kwin screenshot dbus interface. The main difference as I could see is that instead of returning a PNG file, it returns raw image data through a pipe.
This is all fine and I agree it looks better than the old API, yet I assume it means the image data cannot contain any metadata and in particular, it can't contain any color profile. This is a problem for an advanced image editing software such as GIMP where we want to have color-corrected data when possible.
We know that the previous implementation did not provide color profiles for screenshots as well (and as far as I know, I think that Wayland doesn't have color management yet anyway, right?), but we were told that since the API returned a PNG file, the color profile could be embedded in this file in the future. So at least it was "future-proof". Unless mistaken, this new API is not future-proof as it doesn't have any way to evolve with profile transmission. Well not entirely true: the
format result currently only allows
raw but I guess it could some day allow PNG or other formats which could embed a color profile, yet I'm not sure it's necessary/ideal either. We are fine processing RAW and having the color management data in a separate channel.
As I can see it, in a first step, the color profile could be returned as an additional result argument, maybe? Even just saying it is bogus currently, and returning empty so far (up to applications to check if it is empty or not), would be fine as it would allow us to make code which would work in the future when this finally gets implemented (also making this need more visible).