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:

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: