3
\$\begingroup\$

I have a few thousand images that I want to apply the exact same color curve adjustment to. Is there a way to do this in GIMP? I found this How can I get a uniform white balance on a batch of JPEG images? but this is for automatic levels adjustment rather than applying the same adjustment to every image, and I do not understand what it is or how to modify it.

I've saved a preset adjustment in "Adjust Color Curves" in GIMP, but how do I apply this to every image other than just going through everyone and clicking on it?

\$\endgroup\$

1 Answer 1

4
\$\begingroup\$

For anyone else wanting to do this I figured it out.

First I got the color curve I wanted, and clicked the plus to "Save the current settings as named preset"

Then next to the plus I pressed Manage presets -> export current settings to file

Then I downloaded CurveBatch from here http://gimpfr.org/contrib_photolabo.php

Then in GIMP I clicked edit->Preferences->Folders->Plug-ins to find where plug-ins are saved.

I then saved CurveBatch here after extracting it.

Then for GIMP 2.10 I had to change the CurveBatch plug-in (photolab_curvebatch) slightly

I changed

  if lines[0] == "# GIMP curves tool settings\n":

to

  if lines[0] == "# GIMP 'Curves' settings\n":

As GIMP 2.10 changed the first line that indicates it is a curve file (Why anyone would think for a second to do this and break backwards compatibility for no reason I do not know)

Then I pressed Filters -> Script-fu -> refresh scripts

Then I closed GIMP and reopened it.

Then the script now showed up in filters, I pressed Filters->PhotoLab->Batch corrections->curve

I chose the folder my images are in, their extension and the curve file that I exported previously.

This then applied the curves to all of my pictures as I wanted.

\$\endgroup\$
7
  • 1
    \$\begingroup\$ Why anyone would think for a second to do this and break backwards compatibility for no reason I do not know The script you use was written for Gimp 2.6 and is 11 years old. It also hard-codes file locations "~/.gimp-2.6" that are version-dependent. \$\endgroup\$
    – xenoid
    May 3, 2020 at 13:05
  • \$\begingroup\$ Filters -> Script-fu -> refresh scripts not useful here; it only refreshes scripts. Python executables are plugins, you have to restart Gimp to have them taken in account. \$\endgroup\$
    – xenoid
    May 3, 2020 at 13:10
  • \$\begingroup\$ @xenoid"The script you use was written for Gimp 2.6 and is 11 years old. " It works fine with just this individual line changed to match the title of the curve file. There is absolutely no reason for this title to have been changed, and the only possible result of changing it is breaking backwards compatibility. \$\endgroup\$ May 3, 2020 at 14:27
  • \$\begingroup\$ The change saves 3 bytes per file. It adds up. \$\endgroup\$
    – xiota
    May 3, 2020 at 21:53
  • \$\begingroup\$ @xiota No, it does not. A space saving of 0.01% does not add up. How many curve files do you think even the most prolific of photographers use? No-one is attempting to optimise to save such a trivial amount of space (particularly obviously not the intention here considering the superfluous apostrophes added). \$\endgroup\$ May 3, 2020 at 22:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.