by EGreg · 2y ago · 0 comments
Or in Javascript?
I don't want to have to hit any APIs.
JS is probably where you should look. You might be able to find a good PHP drawing library but I've never come across that in my work. Lots of image converting libraries out there (usually just a wrapper around ImageMagik), but "drawing images" usually a client-side thing and you'll find more support for it.
In JS, you'll draw the image to a `<canvas>` element, which can then be downloaded as a PNG. You could go the SVG route, too, depending on the art style. Canvas is the safer bet.
Make a circle.png
Use GD to overlay colour over the radius of the circle
Apply facial details
Then finally anything extra