From f922905d10355c1be621822a4a5e49b9befa77ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bonhomme?= Date: Wed, 22 Feb 2017 07:15:58 +0100 Subject: [PATCH] Clean comments. --- stegano/exifHeader/exifHeader.py | 6 ++---- stegano/lsb/lsb.py | 8 ++------ stegano/lsbset/lsbset.py | 6 ++---- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/stegano/exifHeader/exifHeader.py b/stegano/exifHeader/exifHeader.py index 6133c55..22b3323 100644 --- a/stegano/exifHeader/exifHeader.py +++ b/stegano/exifHeader/exifHeader.py @@ -29,8 +29,7 @@ from PIL import Image import piexif def hide(input_image_file, img_enc, secret_message = None, secret_file = None, img_format = None): - """ - Hide a message (string) in an image. + """Hide a message (string) in an image. """ from zlib import compress from base64 import b64encode @@ -62,8 +61,7 @@ def hide(input_image_file, img_enc, secret_message = None, secret_file = None, i def reveal(input_image_file): - """ - Find a message in an image. + """Find a message in an image. """ from base64 import b64decode from zlib import decompress diff --git a/stegano/lsb/lsb.py b/stegano/lsb/lsb.py index 95215d7..0acdead 100755 --- a/stegano/lsb/lsb.py +++ b/stegano/lsb/lsb.py @@ -36,8 +36,7 @@ except NameError: pass def hide(input_image_file, message, auto_convert_rgb=False): - """ - Hide a message (string) in an image with the + """Hide a message (string) in an image with the LSB (Least Significant Bit) technique. """ message_length = len(message) @@ -99,8 +98,7 @@ def hide(input_image_file, message, auto_convert_rgb=False): return encoded def reveal(input_image_file): - """ - Find a message in an image + """Find a message in an image (with the LSB technique). """ img = Image.open(input_image_file) @@ -134,8 +132,6 @@ def reveal(input_image_file): return "" def write(image, output_image_file): - """ - """ try: image.save(output_image_file) except Exception as e: diff --git a/stegano/lsbset/lsbset.py b/stegano/lsbset/lsbset.py index d22fcbc..ce9fab6 100644 --- a/stegano/lsbset/lsbset.py +++ b/stegano/lsbset/lsbset.py @@ -38,8 +38,7 @@ except NameError: pass def hide(input_image_file, message, generator, auto_convert_rgb=False): - """ - Hide a message (string) in an image with the + """Hide a message (string) in an image with the LSB (Least Significant Bit) technique. """ message_length = len(message) @@ -98,8 +97,7 @@ def hide(input_image_file, message, generator, auto_convert_rgb=False): def reveal(input_image_file, generator): - """ - Find a message in an image + """Find a message in an image (with the LSB technique). """ img = Image.open(input_image_file)