Idea for a new GIMP tool or filter:

I have an idea in mind for a new tool or filter in GIMP. I have some programming experience, but I want to talk about it here before I attempt to make it.

My idea is a tool that can be used when tracing paths, but it may also be available as a brush (though it would be CPU-intensive). It’s purpose I intend it for is for tracing and cleaning up pencil drawings. You would need to draw paths on top of a scanned drawing before use.

In this tool, the user would set a value in radius times number of steps in colour value. This tool would trace over the paths, but with variable line thickness. It would work by limiting the amount of colour change in the neighbouring pixels.

For example, if you try to use this tool to trace a path in black with a value of 255, and the surrounding pixels are white, then it would draw strokes with a 1px radius. If the surrounding pixels are grey with RGB values of 128, then the colour would “spread” further out, and the strokes would have a radius of 2px.

Would this be a particularly challenging tool to implement?

As far as I understand it, this paints black any pixel below some threshold that can be “reached” from the path.

This would achieve the same result:

  • Make a temporary copy of the layer, and threshold it
  • At regular intervals along the path, take the pixel coordinates, and use it for the origin of a gimp_image_select_contiguous_color() call on the thresholded layer that adds the result to the selection.
  • Once done, bucket fill the selection on the drawing layer.

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.