Clean comments.

This commit is contained in:
Cédric Bonhomme 2017-02-22 07:15:58 +01:00
parent 518729cd31
commit f922905d10
No known key found for this signature in database
GPG key ID: A1CB94DE57B7A70D
3 changed files with 6 additions and 14 deletions

View file

@ -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

View file

@ -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:

View file

@ -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)