So, gimp. In theory I can program plugins to do things that are tedious yet simple for me thus cutting out the whole "tedious" part. The trouble is that this rests on, "In theory I can program."
In theory I can program. I have learned how to do bits and pieces (in other programming languages, but still) in the past just by having an idea and trying to run with it to the best of my ability and learning in the process. And I'm definitely capable of learning. But, in this case, in practice I'm more staring at things and having no idea where to start.
So one thing that I've been thinking would be useful would be the ability to create what I think is known as a (user level) macro. I've not used them before, I solved the four dimensional Rubik's cube making every turn manually, but being able to tell the program, "Pay attention," do several things, and then tell it, "See what I just did? I want you to do it again every time I hit [key]" would be useful.
That's not why I'm writing this post, though.
There's a series of things that I've been wanting to do and I realized that a good first step for most of them would be able to, basically, select a color and then, for all the pixels within said color, if they're a given distance from the edge, turn them to another color. The given distance would sometimes be a straight integer, more often be an equation, like [6X +/- .5] or [ -6 + 36.5X +/- 12].
Recently I've realized that it seems like basically everything needed for such a thing is already in gimp. There is a tool that specifically exists for the purposes of selecting a given color, I already knew that. There is a function to shrink the selection by a given distance, which seems like it has to work by checking pixels and saying, "Are you [given distance] from the existing selection border?" and then when the answer is yes making it into the new border. Obviously there's some margin of error since pixels will rarely be integer distances from other pixels. (That margin of error becomes extremely apparent if you compare two selections that started off the same and were shrunk the same amount, but one was shrunken as a series of steps where the other done as a single step)
So it seemed like I'd just have to look at how that worked, modify it a bit, and I'd have my thingy.
I can't even figure out where the code for that is stored.
Now what's there as is does actually allow for me to get what I would want, but to avoid that snowballing error mentioned in the parenthetical above what it would mean would be selecting by color (which can slow things down a lot since it creates really complex selections), saving the selection, shrinking, filling with one color, loading the selection, shrinking by a different (larger) amount, filling with another color, loading the selection, shrinking by a different (larger) amount, filling with the first color, loading the... and that could take all day if not longer.
Annoying as all hell and not something I'm going to spend my time doing.
Can anyone out there tell me how to get what I want? It seems like the place to start might be the shrink selection code, I don't even know where to find it. Or how to find it.
On the subject of not knowing how to find code, I'd like to be able to take a closer look at the mosaic distort and try to apply the interpolation functions to other contexts, but I don't even know how to navigate. I can find a thing that says, "The source code is online here,"* but apparently it's assumed one already knows how to find what they're looking for once they get to the place where the entire program's source code is stored.
Technically it says, "You
can browse the