예제 #1
0
 def test_lsb_encode_1bit_png(self):
     encoded = tempfile.NamedTemporaryFile(suffix='.png')
     lsb_encode(self.png_image, encoded, 'Hello world!')
     decoded_bytes = lsb_decode(encoded)
     self.assertEqual(decoded_bytes[:12], b'Hello world!')
예제 #2
0
 def test_lsb_encode_1bit(self):
     image = create_random_image(15, 15)
     res = lsb_encode(image, None, 'Hello world!')
     res_bytes = lsb_decode(res)
     self.assertEqual(res_bytes[:12], b'Hello world!')