A Design Program That Uses Code

1 points by matthewfelgate ↗ HN
Is there a design program alternative to Photoshop that uses code instead of a visual UI?

Eg put this jpg at coordinates 30,40 make it greyscale 80% and put a 5mm blue border.

Center text over it it font Times New Roman text "Hello"

something like:

  image1 
    file[../text.jpg]
    position(30,40)
    grayscale(80%)

  text(Hello World)
    font(Times New Roman)
    center[image1]


  difference
    rectangle
      size[20,30]
      position(100, 150)
   rectangle
     size[20,30]
     position(120, 160)

  image2 
    file[smile.png]
    crop[circle]

5 comments

[ 4.6 ms ] story [ 21.0 ms ] thread
nip2 does this. It's a little like a spreadsheet, but cells can contain images, matrices, text, widgets, stuff like that. You can add scraps of code to link them together (just like a spreadsheet).

https://github.com/libvips/nip2

Your example might look like this:

https://imgur.com/a/RmESTBw

Everything is live, so you can drag sliders and adjust expressions and it all updates.

There's also imagemagick, of course, but it's command-line only.