Create embroidery images from png or text [closed]

I am creating a canvas in javascript. I am loading an image to the canvas and displaying an image on the canvas, I want this image to be converted to an embroidery filter view.

I can use python nodejs php as a backend. How can I do this, is there a library or function to do this?

I have been searching for 4 days and I can’t find anything

I want a library that I can use to convert images or text to an embroidery filter view.