text-image-ti-software 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ from .ti_software import render_image
2
+
3
+ __all__ = ["render_image"]
@@ -0,0 +1,27 @@
1
+ def render_image(image_path, r_width, r_height):
2
+ from PIL import Image
3
+ from rich import print
4
+ image = image_path
5
+ if not image:
6
+ raise SystemExit("No image path provided.")
7
+
8
+ img = Image.open(image).convert("RGB")
9
+ img = img.resize((r_width, r_height), Image.NEAREST)
10
+ width, height = img.size
11
+ pixels = img.load()
12
+
13
+ pixel_list = []
14
+ for y in range(height):
15
+ for x in range(width):
16
+ pixel_list.append(pixels[x, y])
17
+
18
+ with open(".txt", "w", encoding="utf-8") as file:
19
+ for item in pixel_list:
20
+ file.write(f"{item}\n")
21
+ #Sending code to file
22
+
23
+ for index, (r, g, b) in enumerate(pixel_list):
24
+ if index != 0 and index % width == 0:
25
+ print()
26
+ print(f"[rgb({r},{g},{b})]𪚥[/rgb({r},{g},{b})]", end="")
27
+ print()
@@ -0,0 +1,31 @@
1
+ Metadata-Version: 2.4
2
+ Name: text-image-ti-software
3
+ Version: 0.1.0
4
+ Summary: A module designed to create images from text.
5
+ Author: Milo Carlson, Graham Hodges
6
+ Author-email: milopcarlson@gmail.com
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3.7
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Python: >=3.7
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: Pillow
15
+ Requires-Dist: rich
16
+ Dynamic: author
17
+ Dynamic: author-email
18
+ Dynamic: classifier
19
+ Dynamic: description
20
+ Dynamic: description-content-type
21
+ Dynamic: license-file
22
+ Dynamic: requires-dist
23
+ Dynamic: requires-python
24
+ Dynamic: summary
25
+
26
+ The Text Image (TI) Software
27
+ is dysigned oto turn a image (PNG,JPEG,WEBP,ect.),
28
+ into a copy & pasteable file.
29
+ This may often include making pixel art
30
+ from a photo or texting someone a photo
31
+ when the opption is not avayable.
@@ -0,0 +1,7 @@
1
+ text_image_ti_software/__init__.py,sha256=mvkuElp_1xlHx0LPhl9e4zbsb27aUN57IACcueSQo-s,69
2
+ text_image_ti_software/ti_software.py,sha256=IaCP42Fey2fS5zE5sIUPXLGO3pcQNtcClXES-SzMLlY,852
3
+ text_image_ti_software-0.1.0.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ text_image_ti_software-0.1.0.dist-info/METADATA,sha256=R7e3QyX1NX13v7e8uqmbgT_39v_DsxIzyKw_RfLwHc4,975
5
+ text_image_ti_software-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
6
+ text_image_ti_software-0.1.0.dist-info/top_level.txt,sha256=nes0bmY-4m5DhZ7uryYw1jg9qXkA3-s1Hdv-8w-qpQE,23
7
+ text_image_ti_software-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ text_image_ti_software