snippets

aesthetic imagemagick-edited photos

imagemagick is crazy powerful! seriously, you can do so much cool shit with it, all from your terminal. to be honest i did rip most of the flags in this from various forum threads but the script automates the process of making an image like below, ok? :P

example output from the script belowedited photo of dambara ruru performing on stage with the hand microphone held up to her mouth as she sings. the image has been distorted and transformed using image magick to make it black & white, dither it, and add half tones
	#!/bin/bash
#
# usage: aesimg image_file_name

orig="$1_orig"

cp $1 $orig

magick $1 -level 0x70% -set option:distort:viewport '%wx%h+0+0' -colorspace CMYK -separate null: \( -size 2x2 xc: \( +clone -negate \) +append \( +clone -negate \) -append \) -virtual-pixel tile -filter gaussian \( +clone -distort SRT 60 \) +swap \( +clone -distort SRT 30 \) +swap \( +clone -distort SRT 45 \) +swap \( +clone -distort SRT 0 \)  +swap +delete -compose Overlay -layers composite -set colorspace CMYK -combine -colorspace RGB "$1_ver1"

magick "$1_ver1" -colorspace gray "$1_ver2"

magick "$1_ver2" -ordered-dither h16x16o "$1"

rm -rf "$1_ver1" "$1_ver2"

🔁

🔁