Get the curves difference between 2 images like " Get Curves " Plugin does ?


Hello all,

Since the release of the 2.10 version of Gimp there is a few old plugins not working anymore and for one in particular i’m wondering if G’MIC is already able to do more or less the same thing or maybe it could be an idea/suggestion for a future plugin.

The plugin is " Get Curves Plugin " by elsamuko that we can find here :

To make it short we used 2 layers and got a curve being the difference of the 2 layers, this was allowing to then use this obtained curve on other images ( or in the original one ) to apply the same modifications using the curve obtained, a very useful plugin.

Now since the release of Gimp 2.10 this plugin doesn’t work anymore sadly and i doubt this very old tool will ever be updated so I’m wondering if G’mic is able to do something similar, might already be the case as there is so much plugins that it’s hard to know about all the possibilities offered by this fantastic tool.

PS : I tried things like color transfers and generating a HaldClut to then apply it using the " User-defined " filter but the results are not satisfying, the colors obtained don’t match…

With Gimp 2.8 and the “Get-Curves” plugin it was really easy and quick to do this, having 2 pics , one “original” the other being modified, a quick launch of the plugin and we were getting a curve for the differences in the 2 pictures that was saved and able to be applied on other pictures, not sure now that this plugin doesn’t work how i can achieve the same :confused:

Thanks in advance for the help.



Just a little heads-up to say that i visited the link above for the plugin and discovered a new “” released on Jul 3, 2018.

While i did not had much hope as seeing the author inactive since a while it happened ^^, it works nicely in Gimp 2.10.x, i can again transfer colors based on the differences between 2 modified images.

Saw also that he updated a couple more plugins on his github but there is no binaries for those, apparently they need to be compiled using gimptool-2.0 but I never managed to get this working on windows when i tried with the “Calculate Saturation” plugin months ago, but this is another thing not related to Gmic, i might ask directly there if it’s possible to get some binaries.

Anyways, was looking into Gmic to achieve something similar but never could really get a result good as this “get curves” plugin gives me, happy now to get it back in gimp 2.10.x (Gmic is fantastic for a lot of other things tho :wink: )

This now looks like off topic for Gmic so if a moderator want to delete it or close it it’s fine for me

Thanks a lot :slight_smile:

(Pat David) #3

Glad to see elsamuko still updating scripts! :slight_smile:

I thought there was a style transfer filter for G’MIC? (Not sure, I haven’t checked for something like that in a while).


Yup, can’t thank him but he have my eternal gratitude for doing this :slight_smile:

There is things like Transfer Colors patch based with the haldclut in Gmic that comes to my mind,probably there is more plugins ( hence why i made the first post ) but never i could get a result like i get with this plugin, same when trying with a process including many steps and various plugins…

Also found 10 days ago during a google search a script requested by someone who was missing this plugin and trying to find a solution but the rendering was not excellent and sometimes differing too much from the expected result.

This get curves plugin acts like magic for me, take 2 pics, the original, the modified, get the curves difference saved as a curve, then apply it on a copy of the original pic and try to spot the difference with naked eyes, the best thing is when you work on series of images where only a few were edited long time ago :

get the original and modified one, get the curve difference and now you are good to apply the same on the other images from the serie you left untouched for so long, also from my tests it works really well to get a curve from a pic where a LUT was applied, then i can apply the same process just with this difference curve on other pics, or on a reference haldclut that i will use in Gmic like a LUT, it’s like magic :slight_smile:

(Pat David) #5

Yep, I used this script for a long time. :wink:

I am fairly certain this would be trivial for a G’MIC guru to put together, though (and maybe save having to track down and maintain another plugin). Any takers? :smiley:

(David Tschumperlé) #6

I’d be interested by this, I’d need a detailed explanation of what the script does by the way :slight_smile:

(Glenn Butcher) #7

Isn’t this the equivalent to the new histogram match tool in Raw Therapee?

(Sebastien Guyader) #8

My understanding is that the tool in Rawtherapee just applies one single tone curve on luminosity (not affecting colors independantly), while the Gimp plugin calculates one curve for each of the 3rgb curves, thus applying a kind of color grading.

(Pat David) #9

Given two images, calculate each R,G,B channel to get from one to another (for each pixel). Save/show the resulting curve for the transform.

The images are usually identical, but with some sort of color/RGB channel modification to one of them.

(I can expand on this more tomorrow if needed.)

(David Tschumperlé) #10

Fitting the R,G,B histograms is already what is done by the filter ‘Colors / Transfer colors [basic]’.
Also I think G’MIC won’t be able to save curve data, unless I figure out how this is done internally (where the curve files are stored ?).



The results obtained from Color Transfers plugins in Gmic were never close to matching the sources with all the pics i tried, sometimes not too far, sometimes the results was way different, I don’t know, maybe i am missing something here but never could get good results in my tries.

I don’t know exactly how the plugin works to do his magic but the source code is available here it might help to understand, I am not a coder so i can not really be of any help for this.

For windows version of Gimp the curves are stored by default in: “C:\Users\username\AppData\Roaming\GIMP\2.10\curves\”
But it is possible to get curves stored anywhere and load them in gimp ( like in the video below )

The curve created using the plugin is automatically stored in this path folder with a name like:
for example : “curve_2018-01-01_16-38-15”

Here it is a small video example of the plugin in action :
Direct link just in case ( possible to make a right click and save video) :

The original pic used in video is this :

The modified one was a quick thing done for the demo only

The curve the plugin when launched created is this file ( hosted on zippyshare ) :
You can try to apply it to the pic above ^^

Content of the curve file once opened in notepad++ is this :

Hope this can help a bit,

Thank you very much :slight_smile:


@Yalba correct me if I’m wrong: it’s assumed you have an original and an altered version of that same image. Find the curve difference between those two. Then those curves can be applied to a third image.

If that’s the case then that’s a different problem from the G’MIC transfer colours filters. They try to transfer colours without having an intermediate version of the original to compare with (actually a harder problem).

(Sebastien Guyader) #13

I compiled the plugin in Linux and ran a little comparison with the 3 G’MIC filters for color transfer.

First, the two original images (from pixabay):

This one is the reference:


And this the one I will transfer colors to:


Now the results:

Elsamuko’s get curves plugin:

G’MIC transfer colors “basic”:

G’MIC transfer colors “patch-based”:

G’MIC transfer colors “advanced”:

Note that I used the default settings in G’MIC.
So, elsamuko’s plugin seems works even with two different images, but be careful: it works strangely, and I haven’t succeeded doing the transfer twice… The first time it gave a wrong result, the second it was ok (what I showed above), the third time wrong again…

EDIT: take the get-curves plugin results with a grain of salt… Now I’m not sure how I got a correct result, I can’t make it work correctly with different pictures.


Once @David_Tschumperle adds the mythical machine learning to G’MIC, every problem will solve itself. :mage: :sparkles:

(Sebastien Guyader) #15

Well, color transfer is not the same thing as style transfer, which is more than just transfering colours (for example it can transfer “texture” like brush strokes).
I think that among the three different flavours of color transfer in G’MIC, we are already blessed with a neat tool.

(David Tschumperlé) #16

Ok so if the two images are exactly the same, color transfer is indeed not the best method.
But, it reminds me a lot a test I’ve done a few weeks ago to encode a color transform between two similar images into a single CLUT file (which is even better than curves IMHO, as it can express more complex transformations).
I don’t find the post anymore, where we talked about that last time, but I can give another try this afternoon.


@garagecoder Yup, that’s how i use it in general, especially usefull when you have a series of similar pics from a shoot and you modified only a couple of them, you can then extract the curve from the original vs modified and apply the same changes into the ones you left untouched using the obtained curve, instead of trying remember and find all the changes you applied on those pics.

Once i get the curve i can either apply the curve directly on the pics from the same series that i left untouched or apply the curve on a reference haldclut and use it in Gmic as a kind of LUT.

Also possible with this reference haldclut where the curve was applied to apply it on a video taken with the series of pics to get a similar effect on the video.

@sguyader I never really used it to transfer colors from 2 different content pics, i tried with your examples and i get a very strange result:

The weird obtained picture can be used somehow, putting this in layer on the top of the destination image and modifying the layer mode to use something like Soft light, or inverting the colors and using it in overlay mode and you get some interesting results but in the end it’s a bit the same as taking the reference pic, use blur filter > pixelize and get a single big pixel that will be the average color of the reference pic and then invert colors and do the same i guess.

Can’t remember where i saw this method to match colors between pics by making a single average color pixel and inverting colors, not even sure if it really efficient and really match in terms of transfer of colors too…

I tried the Histogram Match script on those pics, the result is very similar to Gmic transfer colors basic result you posted :

with those settings on the script :

In the end the plugin is not the same purpose as colors transfers indeed, but it helps a lot when you have the original and edited pic + a bunch of other pics coming from the same location and shoot serie.

@David_Tschumperle That will be great indeed, but take your time no hurry :slight_smile: ( I know i asked a couple of things about haldclut’s here but it wasn’t a few weeks back so i doubt it was me^^ )

Thanks a lot all


@David_Tschumperle This one?

(David Tschumperlé) #19

Yes this was this one.
I’ve just finished re-implementing it again by the way (and probably with better options).
I’m preparing a new G’MIC filter CLUT from before/after images, so stay tuned :slight_smile:

(David Tschumperlé) #20

OK, so here is my attempt.
I’ve added a new filter ‘Colors / CLUT from after-before layers’ which can be used to estimate the color transformation that has been applied between two given layers.
Of course, the filter won’t work if the two layers represent different images!

In the video below, I show how it can be used, with these different steps:

  1. From a color image and the ‘color curves’ tool, I generate one color-modified version.
  2. Running the G’MIC filter makes me render a new CLUT layer that corresponds to the estimated transformation.
  3. I apply this CLUT to the original image to show that it indeeds leads to the same outcome.
  4. Finally, I apply the CLUT to a completely different image.

To apply the CLUT, I also use a G’MIC filter, namely ‘Film emulation / User-defined’.

Let me know what you think about it !