Is there a feature to draw SVG paths like handwriting?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
paul7755
Posts: 3
Joined: 2016-07-21T15:05:51-07:00
Authentication code: 1151

Is there a feature to draw SVG paths like handwriting?

Post by paul7755 »

Hi there! Image I hope, my question is allowed in this discussion board.

Is there already a feature in ImageMagick somewhere, which makes SVG paths look like they have been written by hand?

Right now, my import looks like this:

Image

When I aim for something looking more like this:

Image

Any help or advice for the right direction would be highly appreciated. Image
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Is there a feature to draw SVG paths like handwriting?

Post by snibgo »

IM is a raster image processor. It won't modify SVG paths. It ran only rasterise them.

When rasterised, it can do whatever you want, eg blur and apply levels, but I can't see what might make your required output from that input.
snibgo's IM pages: im.snibgo.com
paul7755
Posts: 3
Joined: 2016-07-21T15:05:51-07:00
Authentication code: 1151

Re: Is there a feature to draw SVG paths like handwriting?

Post by paul7755 »

Thank you for the reply! However, I'm sorry, my question might have been unclear.
snibgo wrote:IM is a raster image processor. It won't modify SVG paths.
ImageMagick doesn't have to modify my SVG paths. I'm looking for a way to "paint them differently".

Right now, ImageMagick "paints" the path like the first image above when I import the SVG path and save it as a PNG file. This works well.

But in the end, I'd like to have an PNG file which looks like the second image above. I'd like to use ImageMagick to "paint" the path like handwriting.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Is there a feature to draw SVG paths like handwriting?

Post by snibgo »

IM will paint the path it is given. It won't "paint them differently".

Inkscape may contain a feature to do that.
snibgo's IM pages: im.snibgo.com
paul7755
Posts: 3
Joined: 2016-07-21T15:05:51-07:00
Authentication code: 1151

Re: Is there a feature to draw SVG paths like handwriting?

Post by paul7755 »

snibgo wrote:IM will paint the path it is given. It won't "paint them differently".
Oh, okay. I'm sorry. I must have misunderstood a principal behind SVGs. I thought, SVGs "store" paths and I would be able to tell ImageMagick to use the path to know where to paint and use a - for example red and 10 px wide - "brush stroke" along the path.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Is there a feature to draw SVG paths like handwriting?

Post by snibgo »

Within the SVG language, you can have a "defs" section that defines paths each with an ID, then later in the SVG you can draw any of those path IDs with whatever characteristics (stroke wdth, colour etc) you want. Or you can use a path ID as the basis for doing something else, eg for laying out text.

I don't know of anything in SVG that does what you want, but that's the place to look, not ImageMagick.
snibgo's IM pages: im.snibgo.com
Post Reply