Basic BMP encoding