10-30-2021, 09:54 AM
If (and only if) the process is altering the pixels individually (ie, not using data from adjacent pixels like it's done when sharpening), then you can feed the process an image with 16 mega-pixels, each pixel being a different RGB triplet, and the output will be a "CLUT" (Color Lookup Table). In the general case, all you can then do is invert the CLUT, Note that you can discover than some input RGB values produce the same RGB output (in particular if the process clips a channel) and that some RGB output values cannot be achieved (because there is always some color loss in such processes).
Then, if you are lucky you can discover that the mapping of the R (or G or B) values to output values doesn't depend on the other channels on the same pixel (ie, a Red 200 becomes a Red 220, whether it is in a light gray (200,200,200), strong red (200,0,0), yellow (200,200,0) . In which case you can indeed use Curves to obtain a per-channel mapping.
If you aren't, then you can see if the same would be true in the HSV, HSL, LCH, or Lab models and perhaps be able to emulate the same thing with Gimp.
But in any case, if you want an accurate result, you won't be using Gimp alone, you will need some data exploration tools.
Then, if you are lucky you can discover that the mapping of the R (or G or B) values to output values doesn't depend on the other channels on the same pixel (ie, a Red 200 becomes a Red 220, whether it is in a light gray (200,200,200), strong red (200,0,0), yellow (200,200,0) . In which case you can indeed use Curves to obtain a per-channel mapping.
If you aren't, then you can see if the same would be true in the HSV, HSL, LCH, or Lab models and perhaps be able to emulate the same thing with Gimp.
But in any case, if you want an accurate result, you won't be using Gimp alone, you will need some data exploration tools.