Hacker News new | ask | show | jobs
by Menu_Overview 811 days ago
You'll need a library that can render to some 2D-context that can then be converted to PNG.

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.