i have around 500 images and i need to resize each into 6 different sizes. Can any there scripts or software. moreover my platform is ubuntu .
Like Sathya said, ImageMagick is the best way to go. First, install it:
Then you can make a little bash script to convert them to your 6 sizes:
Save the script as, e.g.
Edit: I edited the script to make sure to not override files when resizing, but rename them to e.g. DSC01258_640x480.JPG, and use convert instead of mogrify since the files are actually renamed. I also sanitized the variables a bit, doesn't hurt.
I tested the script with png files and it worked fine. It should work for all kinds of image formats supported by ImageMagick:
If you install ImageMagick as Sathya mentioned, there is a nice GUI frontend to make resizing easier called
To install it:
Restart nautilus (or log out and back in). It will add "Resize Images" and "Rotate Images" to your context menu as shown here:
Simply highlight all images you want to resize, right-click, select Resize Images, and you will get this interface:
Use the "Append" option and add a custom name to your resized images. You may want to append the size such as 1024x768 OR you can make 6 copies of your images in different folders, then use the resize images in place option on the images in each folder to overwrite them with new images that have different dimensions. Resize images in place will always overwrite the selected images, so be careful what you select!
You can use ImageMagick: First install ImageMagick
Next, cd to the location where your images are there:
Next, create directories according to your Imagesize
Copy the images to the directory where you wish to transform
Next, change the directory to the other directory
Then, use a tool called
This will resize all to
I don't know Bash scripting, so its not that automated.
I would recommend phatch. Its GUI is a lot more flexible than what imagemagick and nautilus have to offer and it has a command line interface too, if you need to write a script. You can install it with
... There really should be several references to mogrify in the convert's manual. ... I searched for about forty-five minutes but it wasn't until I came across another post that I was able to start looking in the right direction.
For the benefit of others this line did exactly what I needed. It took about fifty 2meg to 3meg JPGs (in the same directory) and dropped them all down to 80 to 120 kb. And of course it left all of their names 'exactly' the same.
And, again for the benefit of others:
*.jpg ... performs the mogrify command on all JPGs in the directory.
-quality 75 ... cuts the jpg quality down to 75% which is plenty for online viewing.
-resize "640x480>" ... causes all of the images to be resized to 640x480 (notice the ">" at the end. That makes images smaller but 'not' larger. ... and don't forget the quotes; those are important.
* ... and don't forget this at the very end of the command :-)
I have created a simple to use tool: Picture Resize. It uses imagemagick behind the scene. When installed, it will create an icon on your linux desktop. You can drag and drop one or many images, or a folder of images on it, and it will create a resized copy of each image. The size you want can be easily changed by right-clicking on the desktop icon.