A rectangular image consisting of black lines and white spaces representing data which can be…