(defun txt2img () (interactive) (let ((b (min (point) (or (mark) (point-min)))) (e (max (point) (or (mark) (point-max))))) (shell-command (concat "convert -background whitesmoke -fill black -font Georgia -pointsize 16 -size 340x caption:" "\'" (buffer-substring-no-properties b e) "' ~/Desktop/twitter/caption.png"))) (shell-command "convert ~/Desktop/twitter/caption.png -matte -bordercolor whitesmoke -border 10x10 ~/Desktop/twitter/caption_b.png") (shell-command "mv ~/Desktop/twitter/caption_b.png ~/Desktop/twitter/caption.png"))
Happy hacking!
Created: 08-10-2015 [14:14]
Last updated: 23-01-2025 [00:04]
For attribution, please cite this page as:
Charters, T., "Text to image": https://nexp.pt/text2img.html (23-01-2025 [00:04])
(cc-by-sa) Tiago Charters - tiagocharters@nexp.pt