Tag: Linux

How to do a batch image resize in Linux

Today, I realised my ~/Photos directory has crossed 50GB and I badly had to clear them up. I’m definitely not spending time choosing images to delete this time, but just reduce the size of those high resolution images that are eating away my disk space.

I found a way to reduce the size of the image without reducing the quality much.

you need to install it if you don’t have the tool :

sudo apt-get install imagemagick

The most basic way to use convert is to give a file at a time on the command line:

$ mogrify -verbose -resize 50% <filename>

I had to do this for the whole directory and thus replaced the filename with a *

$ mogrify -verbose -resize 50% *

This is a time consuming operation and thus a due patience is required.

We can also mention the dimension of a picture. Say, I reduced the dimension to 1024×768 with this command:

$ mogrify -resize 1024×768 *.jpg

I also found that we can convert all our PNG images in a folder to the JPEG format

$ mogrify -format jpg *.png

NOTE : mogrify will replace your existing file with the updated content. Make sure you are aware of this.

For further info, $ man mogrify to read the manual or go to http://www.imagemagick.org/www/mogrify.html

How to install Google Wave protocol in your own server

Hi readers,

Here comes my next technical post about my favorite service. I am starting this blog assuming that the readers are aware that Google is no longer in service with wave. The Apache Software Foundation has accepted Google Wave into its incubator program.

Google announced in August that it was ending development of the real-time communication and collaboration project due to low user adoption. Since then, it has been working to prepare Wave in a Box, a standalone version that would give developers the functionality of Waves and the ability to run them on their own server.

As I have been a faithful user of Google Wave, I tried to deploy this in my local machine, so that if it gets succeeded, I shall host it in my own dedicated server and use it for dedicated purpose.

Let me drive you through the installation of “Wave in a Box”. As we don’t have any binary bundle available as such, we need to build it from the source.

You may find it’s source code here


STEP 1 : The mandatory one we need is to have Java.

STEP2 : You must have mercurial to fetch the source from the repository.

I use Ubuntu 10.10 and thus have installed it by the following command

$ sudo apt-get install mercurial

Checkout the source somewhere in your installation directory

$ hg clone https://wave-protocol.googlecode.com/hg/ wave-protocol

Get into the directory and run the following commands

$ cd wave-protocol
$ ant
$ cp server.config.example server.config
Do necessary tweak in server.config files as instructed. I haven’t done any as I have tested in my local machine.
$ vim server.config
Now, you are ready to run the installation
$ ./run-server.sh
Yes you are done ! It’s up and running.Open your favorite browser and browse to
Here’s my  screenshot ..

You will have to create an account to login to the UI. This lacks in many features that you see in Google’s official wave.

Official Website for further details : http://www.waveprotocol.org

Here goes the Wave model code walk http://www.waveprotocol.org/code/wave-model-code-walk

Note : As I said, this project will not have the full functionality of Google Wave as you know it today. Thus you can continue the innovation and customize it for your need as this has been open sourced.

P.S. I am still very green to this technology. Way to go… Please correct me if I’m wrong 😉 .