DKL9 GitList
Repositories
DKL9 home
memoire
Code
Commits
Branches
Tags
Search
Tree:
9cb4e4c
Branches
Tags
master
memoire
occlude.sh
Write occlude.sh to help with card creation
John Smith
commited
9cb4e4c
at 2022-295 17:09:45
occlude.sh
Blame
History
Raw
#!/bin/sh # occlude - generate a set of images with rectangular sections occluded # usage: occlude img # Displays img in iv and generates a numbered occluded image # for every two middle-clicks (which select a position in the image). IFS=', ' BFN="${1%.*}" FE="${1##*.}" CTR=1 '/usr/local/bin/iv' "$1" | while read X Y do if [ -n "$SX" ] then magick "$1" -fill black -draw "rectangle ${SX},${SY} ${X},${Y}" "${BFN}_${CTR}.${FE}" SX='' SY='' CTR="$((CTR+1))" else SX="$X" SY="$Y" fi done