Update README.md
Browse filesfix readme example
README.md
CHANGED
@@ -51,11 +51,11 @@ from io import BytesIO
|
|
51 |
from PIL import Image
|
52 |
import json
|
53 |
|
54 |
-
input_path = os.environ["SCRIPT_INPUT"]
|
55 |
-
output_path = os.environ["SCRIPT_OUTPUT"]
|
56 |
|
57 |
# Load JSON input
|
58 |
-
with open(
|
59 |
data = json.load(f)
|
60 |
img_b64 = data["img"]
|
61 |
|
@@ -68,7 +68,7 @@ img.load() # ⬅️ Ensure image is fully loaded before processing
|
|
68 |
flipped = img.transpose(Image.FLIP_LEFT_RIGHT)
|
69 |
|
70 |
# Save output
|
71 |
-
flipped.save(
|
72 |
print("Image flipped and saved as flipped.png.")
|
73 |
```
|
74 |
|
|
|
51 |
from PIL import Image
|
52 |
import json
|
53 |
|
54 |
+
#input_path = os.environ["SCRIPT_INPUT"]
|
55 |
+
#output_path = os.environ["SCRIPT_OUTPUT"]
|
56 |
|
57 |
# Load JSON input
|
58 |
+
with open("input.txt", "r") as f:
|
59 |
data = json.load(f)
|
60 |
img_b64 = data["img"]
|
61 |
|
|
|
68 |
flipped = img.transpose(Image.FLIP_LEFT_RIGHT)
|
69 |
|
70 |
# Save output
|
71 |
+
flipped.save("flipped.png")
|
72 |
print("Image flipped and saved as flipped.png.")
|
73 |
```
|
74 |
|