Search This Blog

Sunday, June 28, 2009

Rain ke side effects


Rains are a time when many things begin to happen. Here in IIT Bombay, they start clearing the drains, cementing the roads and tarring the roofs (yeah, you read it right :-P ). Most of the campus goes a nice shade of light green, and the moist soil smells so good. And the best of all, little creatures start appearing. Here is my collection :)


Most of the pics which follow were taken in this corridor which connects the four wings of my hostel

:)

A slug

Interesting colour

What are these??



This one looks like a cross between a grass hopper and a moth

An earthworm. People say they are blind (I mean, they don't have any eyes :) ).


Wednesday, June 17, 2009

Resizing images

Pictures accumulate. The treks, trips, parties and the infinite fun that we've had in the past one year of college has resulted in me filling up half my hard disk with photos. My dear friends have fancy cameras which produce 8 mega pixel images, each occupying almost 2.5MB of my precious hard disk space.

Since an 8 mega pix image is serious overkill, I decided to resize them all to 1600x1200 (2 mega pix, around 1MB). Now that I've turned all linuxy, I was looking for a 'Microsoft Office Picture Manager'-like application for linux when Sriram Kashyap suggested that it'd be way easier to write a shell script to do the job.

So friends, here it is :)
#!/bin/bash
pics=`ls $1 | grep JPG`
for pic in $pics
do
   echo "Converting $1$pic ..."
   convert -size 1600x1200 $1$pic -resize 1600x1200 $1$pic
done
Pass the folder containing your pics as an argument to the script, or just put the script in your folder and double-click :)