Skip to content

Instantly share code, notes, and snippets.

@MoriTanosuke
Created August 14, 2012 19:35
Show Gist options
  • Select an option

  • Save MoriTanosuke/3352052 to your computer and use it in GitHub Desktop.

Select an option

Save MoriTanosuke/3352052 to your computer and use it in GitHub Desktop.
Simple BASH script to merge pictures into a single picture, transparently overlayed
#/usr/bin/env bash
# expecting a list of files "trans_vlcsnap-000??.png" that I want to merge into
# file with all images transparently overlayed
#
# need to create transparent images first, but the transparency has to be exponential
# otherwise the single images will blend out too fast in the merged result
for i in $(seq 23 59); do
prev=$(( $i-1 ))
# create transparent file here
composite -compose over -alpha On trans_vlcsnap-000${i}.png out.png out-${i}.png
cp out-${i}.png out.png
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment