generate a BMP by pixels