
Ask HN: Image compositing language? - masonicb00m
Is there a good language for compositing raster graphics? Putting different sub-images in different places, adding text, ... that sort of thing.
======
gus_massa
I'm not sure if this is what you are looking for, but ImageMagic can do a lot
of things like that. See for example
[https://imagemagick.org/Usage/anim_basics/](https://imagemagick.org/Usage/anim_basics/)

Also, you can use the image library of Racket. You can mix bitmaps and
vectorial images. See for example the [https://docs.racket-
lang.org/quick/index.html](https://docs.racket-lang.org/quick/index.html)

------
rgovostes
Processing -- [https://processing.org](https://processing.org) \-- is one of
the easiest and most popular languages for doing 2D graphics (and some 3D
stuff as well). It's Java based, though there are ports to JavaScript such as
p5.js that make it mostly seamless to export your code to the web.

The language and IDE are designed for beginners but it is not limited by it,
and in fact many professional designers use it still. The documentation is
great, with simple live examples of virtually every function. Here's save()
for writing out an image file:
[https://www.processing.org/reference/save_.html](https://www.processing.org/reference/save_.html)

More recently, they've opened it up to make it easy to get third-party
libraries for making web requests, running physics simulations, or augmenting
the IDE itself.

------
bananicorn
Well, SVG, while actually just being XML, supports embedded pngs/jpegs and can
be exported to most raster-graphics formats from the command line. Not sure if
it's what you're looking for, but personally I love the possibility of being
able to scale stuff as I see fit.

------
pzone
Depends on your use case, but the more common paradigm for reusable and
procedural image compositing is the idea of a node graph. Prople prefer to
work this way for the interactive visualization. This kind of functionality is
found in Natron and Blender (free software) as well as Nuke, Fusion and
Houdini (paid.) All of these programs can be scripted with Python.

If you're looking for something to run headless on a server, Imagemagick is a
good choice.

~~~
masonicb00m
Thanks. I didn’t realize Blender did bode graphs—I’ll have to check that out.

I’ve been using ImageMagick but the CLI invocations are pretty awkward. Maybe
I’m just looking for a DSL on top of ImageMagick

