A great program to use in order to edit photos is called imagemagick (Link). This program can be installed using the synaptic package manager (System -> Administrator -> Synaptic Package Manager) or the command line. Installing through the package manager is easy, all you have to do is search for the package called imagemagick, and then install it.
If you want to install using the command line, you will have to type in the command:
sudo apt-get imagemagick
Once you have the program installed, you can use a command called mogrify, in order to edit pictures (a list of all the options can be found on their website). For this article, we will only be using the resize option.
The advantage of using this program is that massive amounts of pictures can be edited quickly. If you wanted to resize all of the pictures in a folder, cd to the folder containing the pictures (Basic Command Line), and then run this command:
mogrify -resize 1280x768 *.jpg;
This command will use the program mogrify, to resize all the .jpg files in the folder to 1280x768. Any resolution wanted can be set, and any picture extension can be used, for example, .png, .jpeg, .gif.
If you sort your pictures into many subfolders, than this one command will do that for you:
find ./ -name "*.jpg" -exec mogrify -resize 700×700 {} \;
This will find any file with the extension .jpg, then will execute mogrify and resize the picture to 700x700, and the brackets and slashes are a part of using the execute command. As can be seen, resizing mass photos is very easy, and very quick compared to any GUI based programs.
Thursday, March 12, 2009
Subscribe to:
Post Comments (Atom)
Instead of doing "imagemagick (Link)", just make the word "imagemagick" the actual link.
ReplyDeleteAlso, when displaying console commands, maybe use a different font, or italicize the words, so we know that it's a console command and not just some other text that you're writing.