Multifill, flatting tools for comics and illustrations, fast and python only - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP) +--- Thread: Multifill, flatting tools for comics and illustrations, fast and python only (/Thread-Multifill-flatting-tools-for-comics-and-illustrations-fast-and-python-only) |
Multifill, flatting tools for comics and illustrations, fast and python only - inkdolls - 10-30-2024 I wrote a plugin long ago to help me in coloring comic pages: 1: Outline image darkened a bit (to minimize gaps) and converted to two bit indexed black and white. 2: Multifill filter fills with random colors. 3: Outlines removed with flatten filter. [attachment=12504] Random colors replaced. Outline added back as a layer in multiply mode. Shading applied. [attachment=12505] I wrote this in 2013 and I regret not having shared it, the only other option was a very slow script on the Gimp Registry. I wrote mine with its own logic not using any Gimp features except access to image data. I wrote it in C and it's fast, even on old 32 bit machines. But I never dared to show my C code and I couldn't have compiled anything on other platforms but Linux. Only very recently I found out by accident about the low level access to gimp images with Python. I ported the code just to try. The result is not as fast, but it's quite reasonable, taking a few seconds and not minutes or hours to finish. My script is dumb, it can't find gaps or merge small areas with the surrounding ones, someday maybe. I know Gimp now has filling with line art detection and there's also an advanced "smart coloring" GMIC filter. But the workflow with line art detection is not great for me, I have to work faster. And being Qt based, gimp-gmic requires that I install 44 packages and use extra 107 MB of disk, versus my tiny plugins that only take a few Kb. [attachment=12506] The flatting tool (edge removal) is copied from the one written by Rob Antonishen that uses the dilate filter, in this case my code would be slower in python. RE: Multifill, flatting tools for comics and illustrations, fast and python only - Ofnuts - 10-30-2024 Nice... Hard to avoid all Qt-based apps so sooner or later you are going to install the Qt support (me, I'm on KDE so Qt support is a given). And what is 104MB these days? I have Gimp XCF files bigger than this :-) RE: Multifill, flatting tools for comics and illustrations, fast and python only - inkdolls - 10-31-2024 (10-30-2024, 05:04 PM)Ofnuts Wrote: Nice... Yeah, I miss the old KDE that allowed different desktop backgrounds... But I use XFCE now. And you're right about the file size, images can quickly fill several GB, even compressed. |