(args)
| 94 | |
| 95 | |
| 96 | def cmd_wm_embed(args): |
| 97 | from StegaPy import StegaPy, StegaPyConfig |
| 98 | from StegaPy.plugin.dwtdugad import DWTDugadPlugin |
| 99 | cfg = StegaPyConfig(password=args.password) |
| 100 | plugin = DWTDugadPlugin(); plugin.config = cfg |
| 101 | sp = StegaPy(plugin, cfg) |
| 102 | |
| 103 | cover = _read(args.input) |
| 104 | sig = _read(args.sig) |
| 105 | stego = sp.embed_mark(sig, os.path.basename(args.sig), |
| 106 | cover, os.path.basename(args.input), |
| 107 | os.path.basename(args.output)) |
| 108 | _write(args.output, stego) |
| 109 | print(f"水印嵌入完成 → {args.output}") |
| 110 | |
| 111 | |
| 112 | def cmd_wm_verify(args): |
no test coverage detected