aeeble aeeble

Login

Export a readable code example as an image with Codeimg.io

A code example in a slide has to stay readable after the slide is resized. Codeimg.io is Igor Duspara’s browser tool for turning a snippet into an image. Try it with two lines you can share, then check what the exported image looks like in the space where you plan to use it. Codeimg.io

Give two lines enough room

  1. In New Project, choose Custom and enter a width and height for the space you have in mind. For a sample, start with 900 by 900 pixels. Give the project a name, choose JPEG and click Create.
  2. Replace the placeholder in the code area with a short example. For instance, put const labels = ["one", "two"] on one line and console.log(labels.length) on the next.
  3. Open Editor to choose the language and adjust the theme and font size. Make sure the reader can tell brackets and quotation marks apart at the intended size. If a line wraps awkwardly, give it more room or choose a shorter example. Codeimg.io editor

To see whether the formatting does its job, imagine the reader is trying to find the line that counts the labels. Make that line easy to spot without asking them to study decorative details.

Check the JPEG where you will use it

Use Download to save the image, then open the JPEG and place it in the slide or message you are preparing. Check the last line at the size others will see. If punctuation is too small, go back to the editor, adjust the font and export again. When someone may want to run or adapt the example, share the same snippet as selectable text alongside the image.

Images
Ratings
Related Lists