mplewis / src2png

📸💻 Turn your source code into beautiful syntax-highlighted images.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

missing from FAQ: possibility of using Pygments

opened this issue · comments

The Pygments syntax highlighter apparently has support for multiple formatters including ImageFormatter for PNG output.

It would be helpful to others to mention it, since you're already mentioning other tools and their pros/cons.

sudo pip install pygments Pillow
pygmentize -O font_name='Andale Mono',line_numbers=false,font_size=16 -o whatever.png /path/to/file