MCPcopy Create free account
hub / github.com/LCBOWER33/StegoScan / verify_image

Function verify_image

StegoScan.py:988–996  ·  view source on GitHub ↗
(f, filename, ext)

Source from the content-addressed store, hash-verified

986
987def image_integrity(output_dir):
988 def verify_image(f, filename, ext):
989 try:
990 with Image.open(f) as img:
991 img.verify()
992 except Exception:
993 dest_dir = os.path.join(results_folder, "image_integrity")
994 os.makedirs(dest_dir, exist_ok=True)
995 shutil.copy(f, os.path.join(dest_dir, filename))
996 prGreen(f"[INTEGRITY] Corrupted or suspicious image: {filename}")
997
998 for ext in ["png", "jpg"]:
999 dir_path = os.path.join(output_dir, ext)

Callers

nothing calls this directly

Calls 1

prGreenFunction · 0.85

Tested by

no test coverage detected