tool · one of 51 Pro saves the PNG
Code image
How do I post a code snippet as a good-looking picture?
Code pasted into a post loses its indentation and its colour, which is why people post pictures of it instead - usually made on a website the snippet is sent to. This highlights the code in the panel, in one of four themes, sets it in a window with a title bar and line numbers, on one of eight grounds, and the preview you tune is the canvas that is saved, at a smaller scale.
Reach it Press ⌘ + K on any tab and type code image. Ctrl + K on Windows and Linux
in the panel · this one is Pro
What this actually is
a code snippet highlighted in a window on a ground, as a sharp png to postA tweet about a new API, a slide in a talk, a changelog entry or a README header. The code never leaves the machine, which matters when the snippet is from a private repository.
Asked about this tool
3 of themIs my code sent to a service to be rendered?
No. The highlighting and the drawing both happen in the panel, and nothing is requested. That is the difference from the websites that do this.
Which languages does it highlight?
It knows comments, strings, numbers, function calls and the keywords of the dozen languages people usually post - JavaScript, TypeScript, Python, Ruby, shell and the like. It is a highlighter for a picture, not a parser, and it never drops a character it does not recognise.
Why twice the size?
Because most people will see it on a high-density screen, where an image at its drawn size looks soft. Twice the size stays sharp and still weighs little.
how to use code image
- Open Code image and paste the snippet into the code field.
- Choose a theme and a ground, and set the window title.
- Tune the text size, the padding, the line numbers and the shadow.
- Save it as a PNG at twice the size, sharp on any screen.
96 of these · no host permissions · three free audits