miércoles, abril 29, 2009

TIP 1: Make some thumbnails [or just resize some pictures]

Have you ever wanted to resize a large amount of pictures, but you don't have time to open every image with `The Gimp', well I have the solution for you. You just need to write a simple Bash script [just one line]. The only requirement is have installed `Imagemagick' on your linux box.

Example: You have 12345678 pictures [PNG, JPG, whatever] with a resolution of 3072x2304 pixels and you want convert them into a resolution of 1024x768 pixels [these new images will be saved into a new directory].

So, you are [running a terminal] where you have the pictures, you just run this:

$ for files in *.JPG; do convert -thumbnail 1024x768 $files ./lq/$files ; done

In this example I'm converting JPG images [you can choose whatever format if Imagemagick accept it] and saving the new images into the `lq' directory [of course you can choose other directory to save your new images].


Well that's it....

PS: If you found any error in my English just tell me [I need to improve it]

1 comentario:

Jorge dijo...

your english sucks!!! xd