Post Reply 

Batch change a color to another color with alpha

May 24, 2014, 22:12
Post: #1
Batch change a color to another color with alpha
I have a large amount of 16x16 pixel images, made up of two colors. I need to make a new set of these images with a different color for another variant of what I'm using these images for. Normally, I just go in and go bucket crazy with foreground and background colors. This works fine, and takes no more than 10 minutes. But I need to create a set with a specific color and alpha value for each of the two colors. I can do this in GIMP using my standard method, but I first have to erase the area before bucket-filling with alpha. Is their either a) a way to make the bucket erase an area before filling, or b) batch change the color and alpha value of these images? Any help would be awesome!
Find all posts by this user
Quote this message in a reply
May 25, 2014, 00:01
Post: #2
RE: Batch change a color to another color with alpha
Do you happen to have a mac binary or where I can get one for BIMP? Can't seem to compile it, don't know where to get libgimp.
Find all posts by this user
Quote this message in a reply
May 25, 2014, 08:13
Post: #3
RE: Batch change a color to another color with alpha
There is a bimp plugin included in Parthas Mac 64 bit version, big zip file, extract the plugin from there.
but
A quick test using BIMP and I do not think it will work.

Transparency/anti-alliasing is the problem.
The most obvious function, color exchange, either leaves untouced or wrecks the image. One that does work is color rotate but the rotate settings are not retained between images so the batch function is no better than standard Gimp. Not to say that there is not some other function that works.

I think it can be done with ImageMagick but again I am have problems with that pesky anti-aliasing. Lots of info available but it takes a bit of sorting. From my notes the bog-standard command for replacing a colour is
convert in.ext -fuzz 15% -fill "#newcolor" -opaque "#oldcolor" out.ext

My suggestion, first have a look at
http://www.fmwconcepts.com/imagemagick/t.../image.php see if anything there.
Then try the users section at
http://www.imagemagick.org/discourse-server/
and ask the question. Fred hangs out there and AFAIK he is a Mac use.

best of luck

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
May 25, 2014, 09:26 (This post was last modified: May 25, 2014 09:49 by rich2005.)
Post: #4
RE: Batch change a color to another color with alpha
@Ofnuts
Still guessing at the form of the OP's images but that script works nicely here. Two colour png exported with transparency.
Python so it does not show up in BIMP 'other procedures' That is BIMP out again.
Hints at command line perhaps?

Edit
I was wrong. Your plugin does show up in BIMP. I used the wrong search term.
FWIW in BIMP
http://i.imgur.com/Q3kmGl7.jpg
and
http://i.imgur.com/SczOeqy.jpg

** https://www.gimp-forum.net/ now answering questions**
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  http://excelgarciniafacts.net/alpha-titan-testo-reviews/ buszanter 0 5 Today 09:09
Last Post: buszanter
  http://www.tips4facts.com/alpha-xr-review Gaqztvch 0 9 Today 08:38
Last Post: Gaqztvch
  What is the best font and color combination to write on this? genebrecht 0 51 Dec 14, 2018 13:00
Last Post: genebrecht
  Increasing Color Bit Depth on Legacy files -- Does it have any immediate effect? EndWggn 2 167 Oct 29, 2018 17:41
Last Post: EndWggn
  How to change the weight of a font in gimp? adrianh 3 851 Oct 4, 2018 16:40
Last Post: paynekj

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS