Need to resize a lot of pictures -- software recommendation needed
My problem is, that when pictures come off of my 7MP digital camera, the filesize is around 3MB. I have been uploading these huge files to my online gallery, which is set to resize the pictures so they are a viewable size anyway.
So, I'd like to take, say, a directory at a time full of .jpg images and reduce their size down to 50% or so before uploading. Can you recommend a software program to do this? (This is probably easy by writing a script to use ImageMagick or something, but I'm just not into writing it myself.) |
man convert
|
I can't convert a whole directory at once, though....or am I missing something?
|
Code:
find . -maxdepth 1 -name "*.jpg" -exec convert -resize 50% {} smaller/{} \; |
Try using a 'for' loop like this:
Code:
$ for i in `ls /path/to/picture/directory/*.jpg`; do convert $i -resize 50% /path/to/output/directory/$i; done |
Wow! I am in awe of your scripting skills!
|
It worked, btw. Kudos to taylor and rkelsen!
|
Quote:
Personally, I prefer a 'for loop' for this sort of thing: Code:
for i in list-of-files; do command $i; done |
Well, most of the programming experience I have is in C, so that's not very useful here. I do agree that shell scripting is extremely useful and worth learning though, I just haven't had the time for it yet.
|
Quote:
|
Quote:
Code:
find ./ -name "filepattern" -print0 | xargs -0 -L 1000 <command> <options> Using a for loop, you also need to watch out for such filenames: Code:
for i in <pattern>; do command "$i"; done |
I have used convert to resize folders full of pictures---without any scripting.
I seem to recall that the "convert -resize" command can take a percentage. Now I can't find the syntax. To do multiple files in one folder: "convert -resize <parameters> *" |
What WM are you running? There is a simple download for KDE that lets you right click on one or more pictures and select a size. It simply calls imagemagick.
|
Quote:
|
Quote:
|
All times are GMT -5. The time now is 07:09 PM. |