You are here

Flatting Tools

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!
multifill.jpg80.76 KB
FlattingTools.scm15.61 KB

Based on a request in the gpr forums:

This consists of two scripts, one to multifill, and one to flatten.

Multifill takes every background coloured space (selectable) and will fill them with sequential palette entries, or randomly. It does NOT check to see if adjacent colours are the same, but use of a large palette should reduce the likelihood.

There is an option to use either the width and height OR the area of each zone for the checks in multifill.

There is a check to ignore (fill with black) a certain size as well (set it to zero to disable). This will have the result once flatten is run to make little spots take the colour of the nearest area.

Lastly, to speed up workflow, there is a checkbox option to make a copy of the lineart layer and set it to multiply (on top of the multicoloured one), and a checkbox option to flatten the multifilled layer automatically afterward.

This means that starting with lineart, you should end up with the original lineart in a multiply layer with a flattened layer of colours below it, already active and ready for you to start using the colour
select tool...

I am not a cartoonist, but this has been tested by the original requester and I am told it works ;)

-Rob A>

Code License: 
GIMP Version: 
Scripting Engine: 


I've been trying to make this tool go, and on really tiny images it works OK. A little slow, but nothing to worry about.

But on normal sized cartoon images scanned at 300dpi (Which is a normal resolution for this type of work.), it is unusably slow. It rarely finishes in under twenty minutes.

Ideally I'd love for this to work near-instantly like the bpelt photoshop plugin, but I understand it's not a binary, so I'd be happy if it was under a minute. That would be usable.

Are other people experiencing this issue? Am I doing something wrong?
Any suggestions?


EDIT: Ok, turns out I was actually at 600dpi, not 300dpi. At 300dpi it still takes about 8-10 minutes to complete. Still kind of too slow to be useful.

Since I did't have scanned images I created one at 300dpi image size 1920x1080 with default palette and 32 areas to fill. I even filled it with dust particles to imitate scanned image from a low-quality print. Takes about 20-25 seconds to multifill and then 2 sec to flatten.

Really! Well, that's encouraging. It means that my problem must be fixable.

I'll experiment with it a bit more. Thanks.


I just discovered this wonderful script, but as I'm using GIMP 2.7 / 2.8, I couldn't run it for some deprecated API issues.

So I tried to fix it: here is a new version ready for the use with GIMP 2.8 (tested on GIMP 2.7.3-20120317). It should work well, but I can't guarantee it's completely bug-free as this is probably the first time I ever saw something written in Scheme. :))

Pfff, well, now the only thing that remains is to learn how to paint. :)

--by H:S

Hey, your link is dead. Any chance you can repost it? I'd really appreciate it. Thanks.

As the title says, The multifill option fills the entire page black. Luckily the copy feature is there to stop me from losing my work, but I would really love to see this brilliant tool in action.
Any advice?

(no gaps in the lines before you ask)

It appears that the background must have a colour for the plug-in to function, if there is just black lines with no background it will paint everything black. I THINK this is an error on my part rather than the developers, so 5/5 anyway :)

Somehow missed this one Rob. It works great. Thanks. :)

Thanks to Saul Goode I have updated this to run much faster, using channel operations rather than looking at the image colour data. Thanks!

As the original requester, I must say - thank you thank you thank you. I added this page to a comment on, I hope they don't mind, but it's the sweetest thing.
Subscribe to Comments for "Flatting Tools"