Created
November 13, 2018 19:11
-
-
Save aphex3k/17210f659a779244186f80827bbd0ec4 to your computer and use it in GitHub Desktop.
compose image to fullscreen wallpaper for raspberry pi touchscreen display
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
t_width=800 | |
t_height=480 | |
if [ -f "${1}" ] | |
then | |
convert "${1}" -auto-orient oriented.bmp | |
convert oriented.bmp -resize ${t_width}x${t_height} foreground.bmp | |
convert oriented.bmp -resize ${t_width}x${t_height}^ -gaussian-blur 5x5 -crop ${t_width}x${t_height}+0+0 -modulate 120,10 background.bmp | |
convert background.bmp foreground.bmp -gravity center -composite -quality 96 "${1}" | |
rm oriented.bmp background.bmp foreground.bmp | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment