{"id":26422431,"url":"https://github.com/chr5tphr/tctim","last_synced_at":"2025-03-18T02:05:15.133Z","repository":{"id":104837340,"uuid":"143278494","full_name":"chr5tphr/tctim","owner":"chr5tphr","description":"True-color terminal image visualization library with command-line interface for python","archived":false,"fork":false,"pushed_at":"2024-12-03T06:04:05.000Z","size":13,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-03T07:18:42.910Z","etag":null,"topics":["debugging","image","numpy","python","terminal","true-color","visualization"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chr5tphr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-08-02T10:17:41.000Z","updated_at":"2024-12-03T06:04:09.000Z","dependencies_parsed_at":"2023-10-20T19:15:26.334Z","dependency_job_id":null,"html_url":"https://github.com/chr5tphr/tctim","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chr5tphr%2Ftctim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chr5tphr%2Ftctim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chr5tphr%2Ftctim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chr5tphr%2Ftctim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chr5tphr","download_url":"https://codeload.github.com/chr5tphr/tctim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244141433,"owners_count":20404836,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debugging","image","numpy","python","terminal","true-color","visualization"],"created_at":"2025-03-18T02:04:15.242Z","updated_at":"2025-03-18T02:05:15.117Z","avatar_url":"https://github.com/chr5tphr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# True-Color Terminal Image visualization library for Python\n\nA tool to view images or matrices directly in your (true-color supporting) terminal.\nGreat for debugging purposes!\n\nIt can visualize (`imprint`) or convert to an image representation (`imgify`) anything that\n* can be cast into a float- or int- numpy array using `numpy.array` and\n* has 2 dimensions (grayscale) or\n* has 3 dimensions where the 1, 3 or 4 color channels (grayscale/ RGB/ RGBA) come first or last.\n\n## Install using pip\n```shell\n$ pip install 'git+git://github.com/chr5tphr/tctim'\n```\n\n## Usage\nExample in Python:\n```python\nimport numpy as np\nfrom tctim import imprint\n\n# make some data to visualize\ngrid = np.mgrid[:32, :32]\ndist = ((np.array([15.5, 15.5])[:, None, None] - grid) ** 2).sum(axis=0) ** .5\n\n# print to console\nimprint(dist)\n\n# make some colorful data\ncol = np.stack([np.zeros_like(dist), dist, -dist], axis=-1)\nimprint(col)\n\n# ================================\n# save file to visualize externally or read later with CLI\nfrom PIL import Image\nfrom tctim import imgify\n\nuint8_array = imgify(col)\nimage = Image.fromarray(uint8_array)\nimage.save('someimage.png')\n```\n\nA command-line interface is included:\n```shell\n$ tctim someimage.png\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchr5tphr%2Ftctim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchr5tphr%2Ftctim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchr5tphr%2Ftctim/lists"}