#!/bin/bash

# Name: scale.sh
# Description: scale images in current working directory
# Requires: ImageMagick
# Run: ./scale.sh
# Date: January 2016
# Author: Richard Hill http://retu.be


# In this example we're scaling all files with extension .jpg
# to a width of 1800 pixels and saving the scaled version in
# a sub-directory scaled/
for i in *.jpg; do
  echo converting $i; identify -ping -format '%w %h' $i; echo
  convert $i -resize 1800x scaled/$i;
done