Display png image in IntelliJ

You have two options:

  • You can use the toString's output to write the link into a Markdown file.
  • You can use Tut for example to embed Scala code into the document to output the link (á lá Jupyter notebook style).

In the IDE you only have to have the file open and it will display the content. As far as printing is concerned, I have never tried that.

Edit: neglected to mention that if you use Tut or MDoc you have to open the processed file found in the target directory.