Fixed steganalysis parity to be compatible with RGBA images

This commit is contained in:
AdrienCos 2019-06-06 21:59:25 -04:00
parent 064456e2a3
commit 2d74094dc3
No known key found for this signature in database
GPG key ID: 97AD9AEBCA16D08D
3 changed files with 10 additions and 1 deletions

View file

@ -31,7 +31,7 @@ def steganalyse(img: Image.Image) -> Image.Image:
"""
Steganlysis of the LSB technique.
"""
encoded: Image.Image = img.copy()
encoded = Image.new(img.mode, (img.size))
width, height = img.size
for row in range(height):
for col in range(width):