diff --git a/stegano/lsb/lsb.py b/stegano/lsb/lsb.py index fc4774e..2e5a3de 100755 --- a/stegano/lsb/lsb.py +++ b/stegano/lsb/lsb.py @@ -82,11 +82,9 @@ def hide(input_image_file: str, # Save the new pixel if img.mode == 'RGBA': - updated_pixel = (r, g, b, pixel[3]) + encoded.putpixel((col, row), (r, g, b, pixel[3])) else: - updated_pixel = (r, g, b) - - encoded.putpixel((col, row), updated_pixel) + encoded.putpixel((col, row), (r, g, b)) index += 3 else: