code: def steganalyse(img):
      
      encoded = img.copy()
      width, height = img.size
      bits = ""
      for row in range(height):
          for col in range(width):
              r, g, b = img.getpixel((col, row))
              if r % 2 == 0:
                  r = 0
              else:
                  r = 255
              if g % 2 == 0:
                  g = 0
              else:
                  g = 255
              if b % 2 == 0:
                  b = 0
              else:
                  b = 255
              encoded.putpixel((col, row), (r, g , b))
      return encoded
docs: Steganlysis of the LSB technique.