#!/bin/bash

###
#
# Usage: ./scale.bash <PNG> <dimensions>
#
# sqdim defaults to 22
# sqdim can be a single int for output width
#              or two ints separated by an x
#
###

orig="$1"
iden=($(identify "$1"))
odim=${iden[2]}
dim=22x22

if [[ $2 ]]; then
	dim=$2
fi

convert -size $odim "$orig" -resize $dim scaled_"$orig"
