Ever wanted to put a couple of images on your site and had the problem that they were just too big?
If you just have a few loading them with a program like photoshop or gimp, resizing them and saving them would do the trick, but what if you want to put let's say 20 in a gallery?
You can find a handy command line package for image manipulation in the ubuntu repositories with the name imagemagick, so to make the underneath work you first have to install it with synaptic or by opening a shell and typing
sudo apt-get install imagemagick
now copy all the files you want to resize to one folder, and be sure to really copy and not just move them, since they're going to be overwritten.
Now switch to the shell again an change to the folder of the copied pictures. If you put them on your Desktop in a folder named pictures and your username would be foouser the command would be
now just copy/paste the following command in the shell and hit return
for i in *.jpg; do echo "$i"; convert "$i" -quality 95 -resize 1000x "$i"; done
what it actually does is:
for i in *.jpg; - the variable "i" is the respective filename
do echo "$i"; - show the filename that is resized right now
convert "$i" -resize 1000x "$i" - convert "i" (the filename) to a size 1000x; This means it is going to be resized with a correct aspect ratio to be 1000 pixels wide. you can change the value of quality from 95 to something higher, if you want a higher compression resulting in smaller file size
done - guess