[NTLUG:Discuss] shrink images globally
Paul Ingendorf
pauldy at wantek.net
Fri Dec 3 19:42:04 CST 2004
Easy way to do this is using Image Magik. You can create a list of files or
if you want all the files in a directory to be changed to a specific size
use the following
for imageFile in *
do
mogrify -antialias -scale 512x348 $imageFile
done
I use mogrify because it allows a lot more manipulation than just scaling
and image format manipulation. You could just as easily substitute convert
while retaining the flags. Also the image you are working on will be
modified and the old info in that file will be lost so use with care.
-----Original Message-----
From: discuss-bounces at ntlug.org [mailto:discuss-bounces at ntlug.org]On
Behalf Of Terry Henderson
Sent: Friday, December 03, 2004 6:19 PM
To: NTLUG Discussion List
Subject: [NTLUG:Discuss] shrink images globally
I sometimes find the need to resize a whole directory of images to a
certain size and would like to learn some efficient way to do it
globally. I use gimp, but it's several mouse clicks and you manually
enter pixel sizes each time for each image and if there are 20 or 30
images, well, you can imagine, it's time consuming.
I'm usually wanting to make them smaller and all the same size.
convert -size 512x348 *
works well, but what you end up with is all of the originals
untouched, and a whole new set of resized files with new names like,
[assume we have just 4 files, p0001.jpg - p0004.jpg] p0004.jpg.0
p0004.jpg.1 p0004.jpg.2 p0004.jpg.3 When, what I'd rather do is just
overwrite with same 'ol filenames as before. Or just something
besides adding .1 .2 .3 etc. to end of files, like p00040.jpg
p00041.jpg p00042.jpg p00043.jpg Or just simply overwrite all and
leave them all same filenames, but just smaller images.
I can use command:
convert -size 512x348 * +profile '*' smaller.jpg
and that just gives me: smaller.jpg.0 smaller.jpg.1 smaller.jpg.2
smaller.jpg.3
Sounds so simple, but just don't see any way to do what I really want to do.
Am I just using the wrong application? or?
_______________________________________________
https://ntlug.org/mailman/listinfo/discuss
More information about the Discuss
mailing list