#!/bin/sh
for img in `ls *.jpg`
do
baseimg=`echo $img | sed s/\.jpg/\.png/`
convert $img -resize '300x300>' $baseimg
done
Certainly not the most versatile piece of code (yet), but it was written in minutes and has saved me quite a bit of time so far. If/when the need arises I'll modify it (and post it here).
Enjoy!
- - - - - - - - - -
ImageMagick does a number of things:
- convert images from one format to another (like jpg to png)
- resize/scale images
- detect image formats
- photo modification (like Brightening underexposed images)
- even: animation
No comments:
Post a Comment