Write BMP files without importing any libraries