aboutsummaryrefslogtreecommitdiff
path: root/codedetec.py
diff options
context:
space:
mode:
Diffstat (limited to 'codedetec.py')
-rw-r--r--codedetec.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/codedetec.py b/codedetec.py
new file mode 100644
index 0000000..19a4073
--- /dev/null
+++ b/codedetec.py
@@ -0,0 +1,16 @@
+from PIL import Image
+import sys
+
+# Get the file path from the command line argument
+file_path = sys.argv[1]
+
+# Open the file and read its contents
+with open(file_path, 'rb') as f:
+ file_contents = f.read()
+
+# Convert the file contents to an image
+image = Image.frombytes('RGB', (100, 100), file_contents)
+
+# Save the image to a file
+image.save('output.jpg')
+