def test_statistics(self): """Test stegano.steganalysis.statistics""" image = Image.open("./tests/sample-files/Lenna.png") stats = str(statistics.steganalyse(image)) + "\n" file = open("./tests/expected-results/statistics") target = file.read() file.close() self.assertEqual(stats, target)
def main(): parser = argparse.ArgumentParser(prog='stegano-steganalysis-parity') parser.add_argument("-i", "--input", dest="input_image_file", help="Image file") parser.add_argument("-o", "--output", dest="output_image_file", help="Image file") arguments = parser.parse_args() input_image_file = Image.open(arguments.input_image_file) output_image = statistics.steganalyse(input_image_file) output_image.save(arguments.output_image_file)