Can now properly write grayscale BMP images. Updated RGA and RGBA to RGB8 and RGBA8.