Search code examples
clojuretga

Clojure library for TGA


I want to create a simple TGA file, for example drawing a line. I didn't find a Clojure library for this, although I found similar libraries for Common Lisp (cl-tga, targa).

Is there any Clojure library to create TGA files?


Solution

  • You can use the very good Quil library, a wrapper around the very good Processing Java library, see for example http://quil.info/api/image/rendering.

    Note on the other hand that Quil, like Processing, draws in a loop, so you have to get used to it. This blog post https://www.tylerlhobbs.com/writings/using-quil-for-artwork explains how to use Quil to generate a single image (as opposed to an animation).