Upgrade to Pro — share decks privately, control downloads, hide ads and more …

giftsh: a DSL and shell for image editing

Anthony Starks
October 31, 2024
1

giftsh: a DSL and shell for image editing

Anthony Starks

October 31, 2024
Tweet

Transcript

  1. Install and run go install github.com/ajstarks/giftsh@latest giftsh giftsh -o f.jpg

    giftsh < f.gsh > f.jpg giftsh -c f.gsh -o f.jpg giftsh -c f.gsh -w f.jpg giftsh -h commands from stdin, output to stdout commands from stdin, output to f.jpg commands from f.gsh, output to f.jpg commands from f.gsh, output to f.jpg commands from f.gsh, write after each command show help and command set
  2. Command list blur brightness colorbalance colorize colorspace contrast crop cropsize

    edge emboss fliph flipv gamma gray help hue invert max min mean median value > 0 value (-100, 100) red green blue (-100, 500) hue (0-360) saturation (0-100) percentage (0-100) l for linear->sRGB or s for sRGB->linear value (-100, 100) x1 y1 x2 y2 (rectangle at (x1,y1) and (x2,y2) width height edge filter emboss filter flip horizontal flip vertical value (< 1 darken, > 1 lighten) grayscale image show command set value (-180, 180) invert image local min size (odd positive integer) local maximum size (odd positive integer) local mean size (odd positive integer) local median size (odd positive integer)
  3. Command list opacity pixelate read reset resize resizefill resizefit rotate

    saturation sepia sigmoid sobel threshold transpose transverse unsharp value (0-100) pixels imagefile (open source file) discard image edits (watch mode only) width height width height width height degrees counter-clockwise value (-100, 500) value (0-100) midpoint (0,1) factor (-10,10) sobel filter color threshold percentage (0-100) flip horizontally and rotate 90° counter-clockwise flip vertically and rotate 90° counter-clockwise sigma (> 0) amount (0.5, 1.5) threshold (0, 0.05)
  4. Reference blur brightness colorbalance colorize colorspace l colorspace s contrast

    crop cropsize edge emboss fliph flipv gamma gray hue invert max mean median min opacity pixelate resizefill resizefit resize rotate saturation sepia sigmoid sobel threshold transpose transverse unsharp Transformations