code: def reveal(input_image_file):
      
      from base64 import b64decode
      from zlib import decompress
  
      img = tools.open_image(input_image_file)
  
      try:
          if img.format in ["JPEG", "TIFF"]:
              if "exif" in img.info:
                  exif_dict = piexif.load(img.info.get("exif", b""))
                  description_key = piexif.ImageIFD.ImageDescription
                  encoded_message = exif_dict["0th"][description_key]
              else:
                  encoded_message = b""
          else:
              raise ValueError("Given file is neither JPEG nor TIFF.")
      finally:
          img.close()
  
      return b64decode(decompress(encoded_message))
docs: Find a message in an image.