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

Interactive image manipulation with popi

Anthony Starks
November 08, 2024
13

Interactive image manipulation with popi

using a text editor (for example Sublime Text), you can create an interactive image editing environment, using popi, and popio a filter to convert the raw images to PNG.

Anthony Starks

November 08, 2024
Tweet

Transcript

  1. popi (portable pico) popi is the portable version of the

    pico program, described in “Beyond Photography: The Digital Darkroom” by Gerard Holzmann. popi works with square, 8-bit (0-255, black-white) raw grayscale images.
  2. original image raw image edited image popio (popi I/O) popio

    -import < ajs.jpg > ajs popio -export < ajs > f.png run popi popio is a Go program to import and export raw popi images. popio reads from stdin and writes to stdout in two modes; (1) read images (JPEG or PNG) writing to raw, and (2) read raw files and write to PNG.
  3. Editor Build System Set up in $CONFIG/Packages/User/popi.sublime-build, place: {"shell_cmd": "popi

    < $file >/dev/null; popio -export < f > f.png"} Select the build system
  4. Editor Set up image in another editor tab popi script

    in editor popi < $file; popio -export < f > f.png f.png Running the build system (Ctrl- or Cmd-B) within the editor runs the script, making the output shown in another editor tab. To change the output, edit the script and re-run the build.
  5. face1 Building popi Download shell archive Download face1.uu https://netlib.org/popi/bundle https://netlib.org/popi/face1.uu

    $ sh bundle # expand shell archive $ uudecode face1.uu # decode image to raw format # change DEF_X and DEF_Y in popi.h to specify image size $ gcc -std=c89 -o popi *.c -lm # build popi $ ./popi # run popi -> r face1 -> new=face1 -> w f -> q # convert to raw popi image to png $ popio -export -width 248 -height 248 < f > f.png $ open f.png # show the image