MCPcopy
hub / github.com/ShieldMnt/invisible-watermark / set_by_bytes

Method set_by_bytes

imwatermark/watermark.py:38–42  ·  view source on GitHub ↗
(self, content)

Source from the content-addressed store, hash-verified

36 self._wmLen = len(self._watermarks)
37
38 def set_by_bytes(self, content):
39 self._wmType = 'bytes'
40 seq = np.array([n for n in content], dtype=np.uint8)
41 self._watermarks = list(np.unpackbits(seq))
42 self._wmLen = len(self._watermarks)
43
44 def set_by_b16(self, b16):
45 content = base64.b16decode(b16)

Callers 2

set_by_b16Method · 0.95
set_watermarkMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected