I\'m writing a BMP image parser, I wrote the read and write functions, which works fine while reading B&W, grayscale, and color images. I\'m writing a function for fragment