Skip to content

Commit

Permalink
Update decode.py
Browse files Browse the repository at this point in the history
  • Loading branch information
itsliamdowd authored Sep 26, 2022
1 parent cd8f2ee commit f2ba805
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions decode.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
import os
from PIL import Image

file_name = input("Enter the name of the file including the extension: ")
file_type = file_name.split('.')[1]
if file_type == "png":
decodeImage()
else:
print('Error')

def decodeImage():
image = Image.open(image_name)
pixels = image.load()
Expand Down Expand Up @@ -43,3 +36,10 @@ def decodeImage():
break
decoded_data = decoded_data[:-10]
print(decoded_data)

file_name = input("Enter the name of the file including the extension: ")
file_type = file_name.split('.')[1]
if file_type == "png":
decodeImage()
else:
print('Error')

0 comments on commit f2ba805

Please sign in to comment.