Converting any common image type to a printable dxf

740 Views Asked by At

I have used a series of CLI statements to take any (simple) picture to a printable dxf file.

I have used a mixture of ImageMagick and potrace to get this to work as I like, however, I would like to combine this all into one process, whether that be through a python library or some other language?

What I have done so far: original oddish

magick convert oddish.bmp -colorspace gray oddishBW.bmp

oddish black and white

magick convert oddishBW.bmp -negate oddishBwB.bmp

oddish black and white inverted

magick convert oddishBwB.bmp -morphology dilate Disk oddishBWBD.bmp

oddish black and white inverted with thicker lines

magick convert oddishBwBD.bmp -negate oddishbwbdw.bmp

oddish with thicker lines inverted to normal

potrace --svg oddishbwbdw.bmp -o oddishbwbdw.svg

final svg of oddish

Name explanations:

bw is standing for black and white bwb is black white black (negate makes the colors opposite) bwbd is black white black dilate (for increasing line thickness)

In addition: I realize the python libraries for imagemagickpython haven't been updated for a long time and don't include morphology features?

0

There are 0 best solutions below