Do you guys know of a way of generating an image f...
# tribe
t
Do you guys know of a way of generating an image from text?
t
Lots. Programmatically or manual? What customizations/formatting do you need?
t
Ideally programmatically. I want to be able to define a template (think font size, font color, background color etc).
t
Long text, or short? Svg manipulation comes to mind first. Or something based off pandoc. Can customize almost anything. You can even overlay or underlay other graphics, and if the template stays the same, trivially automated
Svg is just text. Open any vector editor ( inkscape if you don't have a preferred tool), make a sample, save as svg. Now just sed/however else find/replace the sample text in this file to get a new svg. There should be tons of svg to png/jpg renderers out there, even inkscape should have command line options to do it. It's also possible to do entirely in browser using render to canvas and capture canvas.
h
What’s the use case, @tall-advantage-5586? I think there are a couple of free services that do this as well if making API calls is an option.
t
@tall-postman-9284 Having some difficulty with text alignment and external fonts, but this might just work. Thanks! @helpful-raincoat-87337 Yes, API calls are the ideal way. Would automate everything very well!
The use-case if to automate generation of some social media posts. I have some templates and the only variable apart from that is the text content.