Gimp-Forum.net
Batch fill the transparent backgound - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Batch fill the transparent backgound (/Thread-Batch-fill-the-transparent-backgound)



Batch fill the transparent backgound - Gimpyamateur - 05-07-2020

Hello everyone,

I am looking for 2 plugins ideally (I'm not any good with these texting/code stuff) to help me edit 170 sprites that will:

1) batch delete "select by color tool" of the background color all the sprites and,
2) batch fill in the background (all the checkered areas) with a color of my choice.

It's been quite tedious to do it manually and so far I couldn't find anything on the internet. 

Thank you Smile


RE: Batch fill the transparent backgound - Ofnuts - 05-07-2020

Are all the sprites the same size and not too big? If so you can load them all as tiles in a single layer, edit the layer, and split them back. Some of my scripts that can help:
  • ofn-tiles: loads/save multiple files as one layer and vice-versa
  • ofn-layer-tiles: split a single layer to tile and vice-versa
  • ofn-export-layers: exports all your layers to files, using a pattern to name them.
  • replace-foreground-by-background: replace the background color by the foreground color, usually after you have done a selection on the background (and grown it by one or two pixels, see here why).
  • ofn-file-next: saves & closes current image and loads next in sequence, usually assigned to a shortcut. Very often this is where you spend the most time when mass-editing images.
All scripts here.


RE: Batch fill the transparent backgound - Gimpyamateur - 05-07-2020

Great thank you!

To answer your question, yes they're all the same size. One set of sprites are 400x450 pixels, the other sets are 65x65 pixels.