How to install and execute in a Python virtual environment dev
authorGeorgios Kontaxis <redacted>
Mon, 30 Mar 2026 18:25:11 +0000 (14:25 -0400)
committerGeorgios Kontaxis <redacted>
Mon, 30 Mar 2026 18:34:36 +0000 (14:34 -0400)
HOWTO [new file with mode: 0644]
other/generate_rgb/HOWTO [new file with mode: 0644]
other/generate_rgb/generate_rgb.py [new file with mode: 0644]

diff --git a/HOWTO b/HOWTO
new file mode 100644 (file)
index 0000000..50644f6
--- /dev/null
+++ b/HOWTO
@@ -0,0 +1,19 @@
+# Initialize virtual environment
+# python3 -m venv .venv
+
+# Activate
+source .venv/bin/activate
+
+# Confirm it's activated. (Expect ending with .venv/bin/python)
+which python
+
+# Install dependencies (only if activation is confirmed)
+pip install opencv-python
+pip install pillow
+pip install numpy
+
+# Execute
+for i in `ls other/generate_rgb/*.jpg`; do python img2nef.py --src.hsl=1,1,1 --outputfilenamemethod=INPUTFILE --ifexists=OVERWRITE Z5II "$i"; done
+
+# Deactivate
+deactivate
diff --git a/other/generate_rgb/HOWTO b/other/generate_rgb/HOWTO
new file mode 100644 (file)
index 0000000..6691e44
--- /dev/null
@@ -0,0 +1,17 @@
+# Initialize virtual environment
+# python3 -m venv .venv
+
+# Activate
+source .venv/bin/activate
+
+# Confirm it's activated. (Expect ending with .venv/bin/python)
+which python
+
+# Install dependencies (only if activation is confirmed)
+pip install pillow
+
+# Execute
+python3 generate_rgb.py
+
+# Deactivate
+deactivate
diff --git a/other/generate_rgb/generate_rgb.py b/other/generate_rgb/generate_rgb.py
new file mode 100644 (file)
index 0000000..a50c490
--- /dev/null
@@ -0,0 +1,21 @@
+#!/usr/bin/env python3
+from PIL import Image
+
+# Image size
+width, height = 6064, 4040
+
+# (R, G, B)
+colors = {
+    "red": (255, 0, 0),
+    "green": (0, 255, 0),
+    "blue": (0, 0, 255),
+    "white": (255, 255, 255),
+    "black": (0, 0, 0)
+}
+
+for color in colors.keys():
+    # Create a new image
+    img = Image.new("RGB", (width, height), colors[color])
+    # Save as JPG
+    img.save("{color}.jpg".format(color = color), "JPEG", dpi=(300, 300))
+
git clone https://git.99rst.org/PROJECT