JavaScript program to convert text into a bmp