support single channel bmp

I needed support for single channel bmp images so i copy pasted your decoding function for three channel decoding and changed a few numbers. Probably too much code duplication but maybe this is helpful. If not please discard it. However, it would be awesome if you could code up decoding of bmp images with only one channel.