Skip to content

Instantly share code, notes, and snippets.

@AlexKMDev
Last active August 29, 2015 14:24
Show Gist options
  • Save AlexKMDev/dfe43ecc87ff3171309b to your computer and use it in GitHub Desktop.
Save AlexKMDev/dfe43ecc87ff3171309b to your computer and use it in GitHub Desktop.
#!/bin/sh
if [ -z "$3" ]
then
echo "usage: $0 background.png lgbt.svg output.png"
exit 1
fi
bg_size=$(identify -format '%wx%h' "$1")
convert -resize $bg_size\! $2 -density 1200 -alpha set -channel A -evaluate set 40% $2.png
convert -composite "$1" "$2.png" -geometry $bg_size+0+0 -depth 8 "$3"
rm $2.png
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@imevro
Copy link

imevro commented Jul 3, 2015

foreground.svg → lgbt.svg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment