summaryrefslogtreecommitdiff
path: root/OASIS/docs/convert.py
diff options
context:
space:
mode:
authorEric Dao <eric@erickhangdao.com>2023-05-12 14:09:07 -0400
committerEric Dao <eric@erickhangdao.com>2023-05-12 14:09:07 -0400
commit191e4bd8beae134295d481773823142d2fdc6a98 (patch)
treeaaca4e7f8e229f9bd551d9bb1583b8ecd7a59d4a /OASIS/docs/convert.py
parent186daed7e179241377c117e9d208ccd301d4d712 (diff)
downloadura-master.tar.gz
ura-master.tar.bz2
ura-master.zip
refactored tool chain setup, able to debug and run from vscode nowHEADmaster
Diffstat (limited to 'OASIS/docs/convert.py')
-rw-r--r--OASIS/docs/convert.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/OASIS/docs/convert.py b/OASIS/docs/convert.py
new file mode 100644
index 0000000..a210088
--- /dev/null
+++ b/OASIS/docs/convert.py
@@ -0,0 +1,18 @@
+import subprocess
+import os
+
+# path to the folder containing the images
+folder_path = "/mnt/c/Users/eric/Desktop/FSEG/DPOS/"
+
+# loop through all files in the folder
+for filename in os.listdir(folder_path):
+ # check if the file is a .gif image
+ # construct the full path to the image file
+ image_path = os.path.join(folder_path, filename)
+
+ # construct the new file name, replacing .gif with .jpg
+ new_filename = os.path.splitext(filename)[0] + ".jpg"
+ new_image_path = os.path.join(folder_path, new_filename)
+
+ # call the convert command from ImageMagick
+ subprocess.run(["convert", image_path, new_image_path])