lunatechian (lunatech-ian)

one relating to, belonging to, or resembling lunatech

ImageMagick magic

I am experimenting a bit with ImageMagick. Here is a neat trick that I found. Suppose that you have an image (79.gif) and you want to make an ecard out of it, i.e a montage where 79.gif should appear on the left and your message to the recipient on the right. Here is how you can do it E:\>convert -font arial -pointsize 30 label:"The answer as always is\n42" miff:- | montage -tile 2x1 79.gif - myecard.png

The convert part creates a text label (with your message) and sends the output to the STDOUT , which is piped to the montage command. Montage takes care of stitching the message and the image together. Currently, the 79.gif loses its original resolution and gets resized to the label size. I will update this post further if I find out how to make it retain the original size. This is a good place to start if you are interested

Update : convert -font arial -pointsize 30 label:"The answer as always is\n42" miff:- | montage -geometry +2+1 79.jpg - myecard.png preserves the size of the original image and adds the message to the right of the image as well

Update : convert -size 1200x1600 xc:white -font arial -pointsize 40 -gravity Center -annotate +30+90 "Wishing you a very\nProsperous and a happy 2006\n \n From\n-- Lunatech" -trim +repage miff:- | montage -geometry +2+1 79.jpg - -quality 95 myecard.png does the job. I have added the quality 95 to bring down the file size of the myecard.png

Defined tags for this entry:

Interesting quotes from "You and Your Research" talk by Richard Hamming

  • Another trait, it took me a while to notice. I noticed the following facts about people who work with the door open or the door closed. I notice that if you have the door to your office closed, you get more work done today and tomorrow, and you are more productive than most. But 10 years later somehow you don't know quite know what problems are worth working on; all the hard work you do is sort of tangential in importance. He who works with the door open gets all kinds of interruptions, but he also occasionally gets clues as to what the world is and what might be important. Now I cannot prove the cause and effect sequence because you might say, ``The closed door is symbolic of a closed mind.'' I don't know. But I can say there is a pretty good correlation between those who work with the doors open and those who ultimately do important things, although people who work with doors closed often work harder. Somehow they seem to work on slightly the wrong thing - not much, but enough that they miss fame.
  • Well I now come down to the topic, ``Is the effort to be a great scientist worth it?'' To answer this, you must ask people. When you get beyond their modesty, most people will say, ``Yes, doing really first-class work, and knowing it, is as good as wine, women and song put together,'' or if it's a woman she says, ``It is as good as wine, men and song put together.'' And if you look at the bosses, they tend to come back or ask for reports, trying to participate in those moments of discovery. They're always in the way. So evidently those who have done it, want to do it again. But it is a limited survey. I have never dared to go out and ask those who didn't do great work how they felt about the matter. It's a biased sample, but I still think it is worth the struggle. I think it is very definitely worth the struggle to try and do first-class work because the truth is, the value is in the struggle more than it is in the result. The struggle to make something of yourself seems to be worthwhile in itself. The success and fame are sort of dividends, in my opinion.

The joy of programming

Today, after a long time, I again felt the "joy of programming" - I was working on something absolutely trivial, but the difference this time was that I was not programming for someone else, but just for the heck of it (or simply, because I could).
Defined tags for this entry:

new sig

I found 2 new ascii arts today -- for use in my sig. You can see them on my ascii art collection page

Defined tags for this entry: