Skip to content

Instantly share code, notes, and snippets.

@aphex3k
Created November 13, 2018 19:11
Show Gist options
  • Save aphex3k/17210f659a779244186f80827bbd0ec4 to your computer and use it in GitHub Desktop.
Save aphex3k/17210f659a779244186f80827bbd0ec4 to your computer and use it in GitHub Desktop.
compose image to fullscreen wallpaper for raspberry pi touchscreen display
#!/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