Skip to content

Instantly share code, notes, and snippets.

@voghDev
Created January 31, 2022 11:09
Show Gist options
  • Save voghDev/bd0c1facf744e08e4734377e964e4c20 to your computer and use it in GitHub Desktop.
Save voghDev/bd0c1facf744e08e4734377e964e4c20 to your computer and use it in GitHub Desktop.
Simple script to create a quick horizontal collage appending three images
#!/bin/bash
if [ -z $1 ] || [ -z $3 ]
then
echo "Usage: ./collage3.sh image1.png image2.png image3.png"
else
convert $1 -resize 40% resize1.png
convert $2 -resize 40% resize2.png
convert $3 -resize 40% resize3.png
convert resize1.png resize2.png resize3.png +append collage.png
display collage.png
rm resize1.png
rm resize2.png
rm resize3.png
fi
@voghDev
Copy link
Author

voghDev commented Jan 31, 2022

Simple adaptation with only two images:

#!/bin/bash

if [ -z $1 ] || [ -z $2 ]
then
    echo "Usage: ./collage2.sh image1.png image2.png"
else
    convert $1 -resize 40% resize1.png
    convert $2 -resize 40% resize2.png
    convert resize1.png resize2.png +append collage.png
    display collage.png
    rm resize1.png
    rm resize2.png
fi

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