Added support for loading bmp file from memory