#!/usr/bin/env bash # # resize-test.sh # Copyright (C) 2018 pavle # # Distributed under terms of the MIT license. # echo "Resizing "$1 RES=$(identify -format '%G\n' $1) XRES=$(echo $RES | cut -d "x" -f1) YRES=$(echo $RES | cut -d "x" -f2) if (( XRES > YRES )); then convert $1 -resize $2x $1 else convert $1 -resize x$2 $1 fi