Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Batch resizing of photos
Date: Mon, 25 Dec 2006 23:34:00
Message-Id: 20061225232933.439bbc1c@krikkit.digimed.co.uk
In Reply to: Re: [gentoo-user] Batch resizing of photos by Etaoin Shrdlu
1 On Sun, 24 Dec 2006 13:25:39 +0100, Etaoin Shrdlu wrote:
2
3 > if you don't want to keep the original images, then it's simpler:
4 >
5 > for i in *.jpeg; do
6 > convert -resize WxH ${i} ${i}.resized
7 > mv ${i}.resized ${i} # caution: overwrites original file
8 > done
9
10 If the convert command fails, the original file will still be overwritten
11 with a possibly empty output file. A safer option is:
12
13 for i in *.jpeg; do
14 convert -resize WxH ${i} ${i}.resized && mv ${i}.resized ${i} # caution: overwrites original file
15 done
16
17
18 --
19 Neil Bothwick
20
21 It is impossible to fully enjoy procrastination
22 unless one has plenty of work to do.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
[gentoo-user] Re: Batch resizing of photos Grant Edwards <grante@××××.com>