Saturday, January 30, 2010

Google IME for Indian Languages ...

Using indian languages on a computer had never been so easy. I mean you can type directly in hindi in any windows application - notepad or word or web browser. Thanks to the google transliteration IME. You really don't need to remember the hindi key sequence (which is the case when you use window's native IME support. You can just type in the roman characters and it converts them into your native language (the same thing that happens in Gmail or in other google application. There is a free software called "Baraha" which does the same thing. I have been using this software for quite some time and I found it useful. However, its integration with other windows application is not that good.

After saying all this, I suggest you to download google transliteration IME tool from this link and see for yourself.


Also go through the installation instruction ....

Here is a screenshot of how it looks on my computer. I advise you to enable the short-cut key for enabling and disabling google IME. The google IME icon is sitting at the bottom right corner of the screen.

In fact, I can write directly in Hindi here ... for instance ... क्या आप हिंदी देख सकते हैं ? यह बहुत अच्छा है.

Thursday, January 21, 2010

Convert PS and EPS files into JPEG

I got this useful information from this link.

You can convert any ps or eps file into a jpeg using ghostscript:

gs -sDEVICE=jpeg -dJPEGQ=100 -dNOPAUSE -dBATCH -dSAFER -r300 -sOutputFile=myfile.jpg myfile.eps


This method has one flaw. It produces huge files. Depending on the eps file you may get something like 2000×3000 pixels which is slightly on the insane side. Also the file size of the JPG will be about 10 times that of the eps.
We will now need to trim and resize the file using some Image Magic tools:


mogrify -trim -resize 800x600 myfile.jpg


In order to execute this command on multiple files,  use following bash script

for k in $(ls *.eps); do b=`basename ${k%.eps}`; gs -sDEVICE=jpeg -dJPEGQ=100 -dNOPAUSE -dBATCH -dSAFER -r300 -sOutputFile=$b.jpg $k; mogrify -trim -resize 800x600 $b.jpg; done
 

Saturday, January 9, 2010

Linux on windows: Cygwin

If you use applications that work on only windows (like gtalk, voipcall clients), then you feel like having linux environment on the side, so that you won't have reboot into linux for doing your work. For these people (including me), Cygwin is a good choice. For instance you can have the bash shell, emacs, gnuplot, xfig, gvim, latex, xdvi all at one place ...  The installations is very easy.  Don't forget to install X server of cygwin (cygwin/x) during the installation process. Particularly, latex is more neat to use on cygwin than installing miktex and other tools for the same purpose.