Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Batch Color Replacement Tips? (Bimp)
#1
Hello there all,

I've been using Gimp for a long time now, mostly for pixel art related projects, and I've come across a bit of a head scratcher with this one.
I've recently found myself needing to replace one specific color in multiple (hundreds of) files, with another. I assumed that by downloading Bimp and looking through the available processes there, it'd be a pretty quick fix, but I'm really struggling to find the process I need.

The way things are now, I just need the ability to run a batch process that finds a specific color in an image, and replace it with another (or a process that accomplishes the same effect). As it's a pixel art project, there's no need to worry about any kind of smoothing effect or anything, it's a straight up 1 for 1 exchange I'm looking for.

Any advice here would be hugely appreciataed.

Thanks in advance!
Reply
#2
(11-29-2022, 10:59 PM)PixelGimp Wrote: Hello there all,

I've been using Gimp for a long time now, mostly for pixel art related projects, and I've come across a bit of a head scratcher with this one.
I've recently found myself needing to replace one specific color in multiple (hundreds of) files, with another. I assumed that by downloading Bimp and looking through the available processes there, it'd be a pretty quick fix, but I'm really struggling to find the process I need.

The way things are now, I just need the ability to run a batch process that finds a specific color in an image, and replace it with another (or a process that accomplishes the same effect). As it's a pixel art project, there's no need to worry about any kind of smoothing effect or anything, it's a straight up 1 for 1 exchange I'm looking for.

Any advice here would be hugely appreciataed.

Thanks in advance!

Are the images color indexed (GIF)? If so the process could be different (and easier)?
Reply
#3
If not indexed images then:

One problem is BIMP cannot use GEGL filters - the ones with a G icon, so the Gimp 2.10 color-exchange is not available.

Too many screenshots so check the attached PDF

You can use a color-exchange.exe plugin from Gimp 2.8 That goes in your User Profile plugins folder (1) and shows in Colors -> Map -> Color Exchange (2)

You can run it to check out a swap and here is the 'wrinkle' The plugin dialog uses 0.0 to 1.0 sliders (3) , while in BIMP the plugins needs 0 to 255 values. Use color picker option, set LCH and 0..255 and note the values for later on (4)

In BIMP for 'Other Gimp procedure' use the search function for exchange, there is only one entry. Enter the required values (5)

A quick check and that works here, as the before/after insets.

Attached color-exchange-win64.zip (remember to unzip it) and the PDF with screenshots.


Attached Files
.zip   color-exchange-win64.zip (Size: 25.12 KB / Downloads: 77)
.pdf   bimp-x.pdf (Size: 391.19 KB / Downloads: 127)
Reply
#4
(11-30-2022, 10:01 AM)rich2005 Wrote: If not indexed images then:

One problem is BIMP cannot use GEGL filters - the ones with a G icon, so the Gimp 2.10 color-exchange is not available.

Too many screenshots so check the attached PDF

You can use a color-exchange.exe plugin from Gimp 2.8 That goes in your User Profile plugins folder (1) and shows in Colors -> Map -> Color Exchange (2)

You can run it to check out a swap and here is the 'wrinkle' The plugin dialog uses 0.0 to 1.0 sliders (3) , while in BIMP the plugins needs 0 to 255 values. Use color picker option, set LCH and 0..255 and note the values for later on (4)

In BIMP for 'Other Gimp procedure' use the search function for exchange, there is only one entry. Enter the required values (5)

A quick check and that works here, as the before/after insets.

Attached color-exchange-win64.zip (remember to unzip it) and the PDF with screenshots.

This is really really close to what I need! The only wall I'm running into right now, is that when I'm trying to input the (from) numbers, it seems to round up/down the value, and doesn't allow for the precise digits (i.e, 87.4 becomes 87).
When running the batch process with those inputs, it doesn't seem to change the image.

I'm going to continue to play with this, because it might be an error on my end, but if you have any idea what could be wrong, any help would be hugely appreciated.

Thanks!

EDIT: The stupidest GIMP user award goes to... PixelGimp!

I just realised the output folder was different, it was working the whole time! Thanks so much, this is actually perfect!
Reply


Forum Jump: