Search code examples
imagegimp

How can I replace a thick line in Gimp with values/text?


Suppose I have the following image in GIMP.

enter image description here

I want to replace/re-draw the exact line; but instead of having the thicker line, I want to do it using numbers.

The best method I found is using the Paths tool, in which I select the line and then add the text I want using the Text along path option. This result is shown below:

enter image description here

As you can see, the result is not that efficient because I am selecting the edges/lines manually using the Paths tool.

Question : Is using the Paths tool method is the only way to do it ? I read a lot of threads, and I wasn't lucky to find any alternatives.


Solution

  • Basically, yes, the path tools is the best/fastest way. Text-along-path is the only practical and clean way to lay out text along a curve(*). no other way to have clean curved text (distorting the text as a bitmap is going to blur it). So the only question is how you draw the path: manually or automatically.

    To do it automatically, you would get a selection on the line, then do Select>To path and process the path, but I don't know any script than can create a center line or even a script than can discard one half of the path.

    On the other hand with some habit drawing the path is quite fast, your line can be done with just three points:

    enter image description here

    (*) there is also the ofn-text-along-path script but it also uses a path.