Comic-Fu
Posted Tue, Feb 9, 2010 in:Angie has been slaving away working on Company-Y lately, and I think it’s coming along quite nicely.
Yesterday I decided to give her a break by helping with the coloring of the latest page “I love it when a plan comes together”, and I realized that the coloring process could be greatly sped up if we could simply flood fill the various areas, rather than having to draw around the outline of the area before flood filling it.
The comic is drawn in The GIMP. The lines are drawn on an transparent layer, and then the coloring is done on another layer below, so as not to mess up the lines. Since there are no boundaries on the lower layer, flood filling doesn’t work.
So I tossed together a quick TinyLisp add-on which takes the current layer, duplicates it, thresholds on alpha level (gets rid of any pixels that aren’t within a certain opacity level), and puts the new layer below the current one. After that, flood filling can be done in the lower layer without any issues related to the antialiased/feathered edges of the lines.
It’s a fairly simple script, though it took me a while to get it all working correctly (why the heck do all the GIMP built-ins return lists, making me have to (car …) everywhere, instead of just the primitives?)
Anyway, I was inspired, and came up with some ideas for some more time-saving add-ons to write, so I’ve started a Comic-Fu project at GitHub
If you want to install it, simply download make-fillable.scm and put it into your .gimp-2.6/scripts directory. It should then be in the Filters->Comic-Fu menu the next time you start up the GIMP.
p.s. I’m totally counting this as one of my programs for my 500 Programming Languages thing. I’ll do a write-up of TinyScheme at a later point.