Skip to content

Instantly share code, notes, and snippets.

@fishkingsin
Last active October 19, 2018 04:21
Show Gist options
  • Save fishkingsin/c5e2e18ac15042a008e507bdb6ffdea4 to your computer and use it in GitHub Desktop.
Save fishkingsin/c5e2e18ac15042a008e507bdb6ffdea4 to your computer and use it in GitHub Desktop.
gen dummy image iwth difference pattern
for i in $(seq $1 $2)
do
if test -e $i.jpg ; then
echo "already created $i"
else
convert -size 50x50 xc: +noise Random -virtual-pixel Tile -blur 0x5 \
-auto-level -separate -background white \
-compose ModulusAdd -flatten -channel G -combine +channel \
-set colorspace HSB -colorspace RGB tile_diag_source.jpg
convert tile_diag_source.jpg \( +clone -transpose \) \
\( +clone -sparse-color voronoi '%w,0 white 0,%h black' \) \
-composite \
\( +clone -flop -chop 1x0 \) +append \
\( +clone -flip -chop 0x1 \) -append \
-resize 4000x3000 \
tile_diag_mirror.jpg
echo create $i
convert tile_diag_mirror.jpg \
-font Arial -pointsize 720 \
-draw "gravity center fill white text 0,0 '$i'" \
$i.jpg
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment