imagegen

[Done] Collection of Random Image Generator Scripts.
git clone https://git.jojolepro.com/imagegen.git
Log | Files | Refs

mepapemaker.sh (741B)


      1 #!/usr/bin/bash
      2 
      3 pape=$1
      4 
      5 # Get the width of the wallpaper
      6 height=$(magick convert "$pape" -format "%h" info:)
      7 width=$(magick convert "$pape" -format "%w" info:)
      8 
      9 # Calculate appropriate height for logo on the wallpaper
     10 logo_height=$(($height*9/16))
     11 
     12 # Generate Mask
     13 convert "./arch.png" -gravity center  -resize $logo_height -background white -extent "${width}x${height}" -flatten "temp_logo.png" 
     14 
     15 # Generate Wallpaper
     16 outfile_name=$(basename "$pape")
     17 
     18 convert "$pape" -write-mask "temp_logo.png" -gravity center \
     19 	-blur 0x30 \
     20 	-attenuate 0.3 +noise Laplacian\
     21 	-evaluate Multiply 1.3 \
     22 	"arch_btw_$outfile_name"
     23 
     24 # Delete temporary file
     25 #rm "temp_logo.png"
     26 
     27 # TODO: imagemagick giving colorspace warning
     28 # TODO: Use SVG instead of png?