I’m writing a program to extract a hidden message from an input BMP file. I’m having trouble looping through the image after the header data and…