0

Batch image resizing in Ubuntu

Linux

One of the things I have found lacking is the image resizing tools available to me through the Ubuntu repositories. Until now, I had always used Gimp to scale an image which worked fine, but really didn't make me happy when I needed to resize a ton of pics.

Browsing through the ubuntuforums recently, I came across a mention of a batch resize script that could be used in Nautilus, via a right-click > scripts contextual menu. Obviously, this sounded perfect since I really wanted something to work like the Windows Power Toys image resizer tool.

I never knew this was possible (I learn new stuff every single day I use Linux) but you can create scripts, make them executable, and drop them in the /.gnome2/nautilus-scripts/ directory and just grab at them by right clicking while in Nautilus.

Anyways, back to the script...

Basically, ALL you have to do is download this script, make it executable and drop it in the right place.


NOTE: For some reason the "+" sign is lost in the codeShare process... the chmod line should read: chmod u+x Resize_images

ANOTHER NOTE:  I didn't have to install rename for this to work, good thing too.  It wasn't in the repos! 

Now, go into the folder that contains the images you want, select 1-All, right click and go to Scripts and click on the one called 'Resize_images'.You will be presented with a selction of resize options, pick the one you want and click OK.

 


 

 

Another great thing about this script is that it places the resized images in a new directory instead of resizing the originals.

Here is the blog where I found the info for this script

 

tags:
Linux
 
Sweet! I confirmed that this works in openSUSE 10.2 as well. It appears that I had imagemagick and zenity installed by default, and there was no package named 'rename'. The lack of 'rename' didn't seem to have any adverse effect.
 
posted 936 days ago
Add Comment Reply to: this comment OR this thread
 
 
Word to your madre
 
posted 936 days ago
Add Comment Reply to: this comment OR this thread
 
eracoon said:
 
Strange...
I cannot find "Scripts" in any contextual menus when selecting images in Nautilus.
I'm using Feisty 7.04 and sis all the steps you indicated
 
posted 885 days ago
Add Comment Reply to: this comment OR this thread
 
 
I encountered a similar issue with another script I tried before this one. Are you sure you CHMOD'ed the file?

chmod u+x Resize_images
 
posted 885 days ago
Add Comment Reply to: this comment OR this thread
 
 
Make sure you restart gnome as well. You won't see it immediately.
 
posted 885 days ago
Add Comment Reply to: this comment OR this thread
 
eracoon said:
 
It working guys...

I forgot to put the + indeed in the chmod command.
After that I tried Chmod 755 wich works also offcourse
I sudo copied it... wich made root the owner... wich in turn did not show up in the scripts.
Its working great. But I changed the script to fit my needs and now the resized files are just resized and not renamed.

Thanks for your help
 
posted 884 days ago
Add Comment Reply to: this comment OR this thread
 
Wim said:
 
Strange... I've installed the script just like you did. Everything seems to go well (except that rename was missing here alsoo), but when I resize a picture, the created folder is still empty. I can't find the resized pictures.

Has anyone an idea? I'm using Ubuntu Feisty.

Thanks!
 
posted 871 days ago
Add Comment Reply to: this comment OR this thread
 
Allen said:
 
I've been wanting something like that for a while since I too used the Windows Image Resizer Powertoy. I did a chmod 740 on the file and got renameutils from the Ubuntu repos since rename wasn't available. WORKS GREAT!
 
posted 868 days ago
Add Comment Reply to: this comment OR this thread
 
aaron said:
 
Brilliant, absolutely brilliant. Scripts are clever, it would be great if ubuntu shipped with more scripts like this.

For people having trouble with the empty directory make sure you have imagemagick installed first
sudo apt-get install imagemagick
then run
sudo apt-get install imagemagick zenity rename

You will notice is takes longer to process after this as it's not missing a step.
 
posted 842 days ago
View Replies (1) || Add Comment Reply to: this comment OR this thread
 
.: HIDE REPLIES :.
Will said:
 
Would you be able to confirm if the resized images would keep the existing EXIF information from the original images? This would really help me a lot in resizing tons of pics. By the way, thanks for posting this very helpful guide.
 
posted 359 days ago
Add Comment Reply to: this comment OR this thread
 
Wim said:
 
Thnx mate, it's working! The strange thing is that I had installed imagemagick before, it even said that the newest version was allready installed.
 
posted 841 days ago
Add Comment Reply to: this comment OR this thread
 
tommytomato said:
 
Cheers Dude it worked well, thank you very much.

TT
 
posted 831 days ago
Add Comment Reply to: this comment OR this thread
 
David Sterry said:
 
Thanks a lot. This is so awesome first for what it does and second for the possibilities it exposes. Rock.
 
posted 819 days ago
Add Comment Reply to: this comment OR this thread
 
Threlkeld said:
 
In Feisty, I found that I kept getting the empty folder problem until I used synaptic to install ImageMagick - even though it it claimed to have been installed previously...
 
posted 697 days ago
Add Comment Reply to: this comment OR this thread
 
oofnik said:
 
Works great in Ubuntu Hardy. Thanks a lot!
 
posted 519 days ago
Add Comment Reply to: this comment OR this thread
 
Diego said:
 
Give a try to phatch, a very good tool for batch image processing
http://photobatch.stani.be/
 
posted 501 days ago
Add Comment Reply to: this comment OR this thread
 
Dave said:
 
Great stuff. Have just installed this script on Intrepid and it works perfectly!
 
posted 275 days ago
Add Comment Reply to: this comment OR this thread
 
WOW gold said:
 
 
posted 214 days ago
View Replies (1) || Add Comment Reply to: this comment OR this thread
 
.: HIDE REPLIES :.
tommytomato said:
 
Once again this script has worked, I installed imagemagick put the script were it needed to be then ran the script in my images folder and it created the image size I need, thanks again.

Ubuntu 9.04 GUI
 
posted 179 days ago
Add Comment Reply to: this comment OR this thread
 

Search

Fuelly