[magick-users] "Intelligent" resize

Al Bogner imagemagick at ml093.pinguin.uni.cc
Fri Nov 20 13:11:44 PST 2009


Am Freitag, 20. November 2009 20:14:12 schrieb Fred Weinhaus:

Hi Fred,

> convert image -resize 1800x1800 resultimage
> 
> will always make the larger side 1800 and the other (smaller side)
> stay in proportion

I tried this and it _enlarges_ the image:

for INP in `find "$ORIGINALPATH" -type f \
-regex ".*\(jpg\|jpeg\|png\|tif\|tiff\|gif\)" | sort`; do
	NEWFILE=`echo "$INP" | sed 's/originals/gallery/'`
	NEWFILE="${NEWFILE%.*}"".jpg"
	NEWDIR=`dirname "$NEWFILE"`
	mkdir -p "$NEWDIR"
	echo "creatIng "`basename "$NEWFILE"`
	convert "$INP" -resize 1800x1800 "$NEWFILE"
done

Al


More information about the Magick-users mailing list