Yeh - you can do it from the command line. You will need 2 progs to do it...
bmptopnm
pnmtopng
The first will take your bmp file (I think it needs to have a .bmp extension, so you will have to check that the filename is correct beforehand) and convert it to a portable pixelmap format.
The second will take your pixelmap and convert it to a PNG format file. From here you can then load it into PHP using the appropriate gd lib functions for png' ([man]imagecreatefrompng/man).
Have fun 🙂