Convert is a tool for linux to convert between image formats, resize, flip and do many more with images.

I wanted to reduce the resolution of 160 image files (*.jpg) and add copyright lable. To do one by one is a time consuming and boring task. So I google a bit and found this nice tool which was installed with Fedora 10 by default. So no additional software installations and work done.

Here is the script I wrote to get the work done.

#! /bin/sh

DIR=~/123

for n in $(ls $DIR)
{
convert $DIR/$n -resample 28.25 -gravity SouthEast -fill white -draw 'text 10,10 "COPYRIGHT TEXT"' $DIR/$n
echo $n
}

exit 0

I copied all the images to "123" directory in my home directory. "-resample" is for the resolution and the rest for the copyright lable.

It took only about three minutes to get the work done (The original size of the images were 372MB which reduced to 75MB after reducing the resolution). Image how much time it will take if I used an image editing software like GIMP or photoshop.

Here is the link if you want to find out more,
http://www.imagemagick.org/www/convert.html
0

Add a comment

A late announcement, a little more than 2 years, I moved to Medium. I won't be making any new posts here in this blog. Please refer/follow https://medium.com/@callkalpa for the latest articles.
0

Add a comment

About Me
About Me
Subscribe
Subscribe
Popular Posts
Popular Posts
  • "The Snare is a poem which evokes positive attitudes within the reader." (1) Which kind of attitudes are evoked? (2) Show them wit...
  • "Island Spell" by Wendy Whatmore vividly describes a beautiful island. The starts her poem saying that she was caught in an island...
  • Try configuring your SLT ADSL connection yourself. Don't WASTE money for SLT . Here are the settings. Type : PPP...
  • To use java tools (javac, java, applet viewer etc.) from anywhere in the dos prompt java should be configured. Suppose that you have already...
  • A late announcement, a little more than 2 years, I moved to Medium. I won't be making any new posts here in this blog. Please refer/foll...
  • SOURCE: http://www.avidtrader.com/wordpress/wp-content/uploads/2013/01/reports.jpg Recently I was involved in developing a registration...
  • Welcome to WSO2 Application Server 6.0.0, the successor of WSO2 Carbon based Application Server. WSO2 Application Server 6.0.0 is a complet...
  • I recently came across this requirement where a  xsd:datetime  in the payload is needed to be converted to a different date time format as ...
  • Dialog GSM offers its latest service,Budget SMS, to both post paid and pre paid customers. With this service you will be able to send D2D SM...
  • Photo Credit : Prima Yogi FAD Singapore 2015 was held on 5th and 6th of December in Singapore and I participated at the event. FAD (F...
Labels
My Links
Blogs I read
Blogs I read
Loading