image-on-terminal


Nameimage-on-terminal JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttps://github.com/odell0111/image-on-terminal
SummarySimple Python package to display an image in the terminal by converting it into text
upload_time2023-10-13 01:21:03
maintainer
docs_urlNone
authorOdell
requires_python>=3.9
licenseMIT License Copyright (c) 2023 Odell Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords terminal image imageonterminal image on terminal imageinterminal image-in-terminal image in terminal imageonconsole image-on-console image on console imageinconsole image-in-console image in console imagetotext image-to-text image to text
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Image On Terminal

Simple Python package to display an image in the terminal by converting it into text. For the desired behavior to be achieved, the terminal must support colors and there should be no spacing between lines (0 line-spacing).

## Installation
```pip install image-on-terminal``` <br/>

## How to use
You can use the package either from the terminal or from a script.

```
imageonterminal -h

usage:
  imageonterminal image_uris [options]

positional arguments:
  image_uris            File path(s) or HTTP/HTTPS link(s) of the image(s) to be displayed. A directory can also be
                        passed in which case all supported images in the directory will be displayed.

options:
  -h, --help            show this help message and exit
  -w WIDTH, --width WIDTH
                        Destination width of the image(s).
  -wt WHITENESS_THRESHOLD, --whiteness-threshold WHITENESS_THRESHOLD
                        (float [0 - 1]). Pixels with a whiteness higher than this value will be inverted.
  -dt DARKNESS_THRESHOLD, --darkness-threshold DARKNESS_THRESHOLD
                        (float [0 - 1]). Pixels with a whiteness lower than this value will be inverted.
  -r, --recursive       If a directory is passed as image_uri the image search will be recursively performed within
                        the directory passed and all its subdirectories.
```

**From the terminal:**
```
imageonterminal "myImage.jpg"
imageonterminal "https://images/exampleImage.jpg" "myOtherImage.png" -w 128
imageonterminal "myImagesOnWhiteBackgrounds" -w 256 -wt 0.97 
```

**From a python script:**
```
from imageonterminal import display_image
display_image("myImage.jpg")
```

## Screenshots
<div align='center'>
  <p>JPG 256x256</p><br/>
  <img src="https://raw.githubusercontent.com/odell0111/image-on-terminal/main/Screenshots/01.krita_jpg_x256.png"><br/><br/>
  <p>PNG 128x128</p><br/>
  <img src="https://raw.githubusercontent.com/odell0111/image-on-terminal/main/Screenshots/02.am_png_x128.png"><br/><br/>
  <p>PNG 256x256</p><br/>
  <img src="https://raw.githubusercontent.com/odell0111/image-on-terminal/main/Screenshots/03.ar_png_x256.png"><br/><br/>
</div>



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/odell0111/image-on-terminal",
    "name": "image-on-terminal",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "terminal,image,imageonterminal,image on terminal,imageinterminal,image-in-terminal,image in terminal,imageonconsole,image-on-console,image on console,imageinconsole,image-in-console,image in console,imagetotext,image-to-text,image to text",
    "author": "Odell",
    "author_email": "odellgm11012001@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/76/d9/c7d10d77181402e9f53594955064feff847251dcc0ade780cf56f189e7e1/image-on-terminal-1.0.2.tar.gz",
    "platform": null,
    "description": "# Image On Terminal\r\n\r\nSimple Python package to display an image in the terminal by converting it into text. For the desired behavior to be achieved, the terminal must support colors and there should be no spacing between lines (0 line-spacing).\r\n\r\n## Installation\r\n```pip install image-on-terminal``` <br/>\r\n\r\n## How to use\r\nYou can use the package either from the terminal or from a script.\r\n\r\n```\r\nimageonterminal -h\r\n\r\nusage:\r\n  imageonterminal image_uris [options]\r\n\r\npositional arguments:\r\n  image_uris            File path(s) or HTTP/HTTPS link(s) of the image(s) to be displayed. A directory can also be\r\n                        passed in which case all supported images in the directory will be displayed.\r\n\r\noptions:\r\n  -h, --help            show this help message and exit\r\n  -w WIDTH, --width WIDTH\r\n                        Destination width of the image(s).\r\n  -wt WHITENESS_THRESHOLD, --whiteness-threshold WHITENESS_THRESHOLD\r\n                        (float [0 - 1]). Pixels with a whiteness higher than this value will be inverted.\r\n  -dt DARKNESS_THRESHOLD, --darkness-threshold DARKNESS_THRESHOLD\r\n                        (float [0 - 1]). Pixels with a whiteness lower than this value will be inverted.\r\n  -r, --recursive       If a directory is passed as image_uri the image search will be recursively performed within\r\n                        the directory passed and all its subdirectories.\r\n```\r\n\r\n**From the terminal:**\r\n```\r\nimageonterminal \"myImage.jpg\"\r\nimageonterminal \"https://images/exampleImage.jpg\" \"myOtherImage.png\" -w 128\r\nimageonterminal \"myImagesOnWhiteBackgrounds\" -w 256 -wt 0.97 \r\n```\r\n\r\n**From a python script:**\r\n```\r\nfrom imageonterminal import display_image\r\ndisplay_image(\"myImage.jpg\")\r\n```\r\n\r\n## Screenshots\r\n<div align='center'>\r\n  <p>JPG 256x256</p><br/>\r\n  <img src=\"https://raw.githubusercontent.com/odell0111/image-on-terminal/main/Screenshots/01.krita_jpg_x256.png\"><br/><br/>\r\n  <p>PNG 128x128</p><br/>\r\n  <img src=\"https://raw.githubusercontent.com/odell0111/image-on-terminal/main/Screenshots/02.am_png_x128.png\"><br/><br/>\r\n  <p>PNG 256x256</p><br/>\r\n  <img src=\"https://raw.githubusercontent.com/odell0111/image-on-terminal/main/Screenshots/03.ar_png_x256.png\"><br/><br/>\r\n</div>\r\n\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Odell  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Simple Python package to display an image in the terminal by converting it into text",
    "version": "1.0.2",
    "project_urls": {
        "Homepage": "https://github.com/odell0111/image-on-terminal",
        "repository": "https://github.com/odell0111/image-on-terminal"
    },
    "split_keywords": [
        "terminal",
        "image",
        "imageonterminal",
        "image on terminal",
        "imageinterminal",
        "image-in-terminal",
        "image in terminal",
        "imageonconsole",
        "image-on-console",
        "image on console",
        "imageinconsole",
        "image-in-console",
        "image in console",
        "imagetotext",
        "image-to-text",
        "image to text"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "68f372bab589675d5533604e95ae67bb72bec875f1229614eebfa3a3340c1955",
                "md5": "fa1dc8916e33a575ed8490a43b99cd53",
                "sha256": "4fcdb4362f55fb5179185b0ab703211ea07d7d360f0c47ec8953f0f27aaa28fa"
            },
            "downloads": -1,
            "filename": "image_on_terminal-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fa1dc8916e33a575ed8490a43b99cd53",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 6756,
            "upload_time": "2023-10-13T01:20:59",
            "upload_time_iso_8601": "2023-10-13T01:20:59.458030Z",
            "url": "https://files.pythonhosted.org/packages/68/f3/72bab589675d5533604e95ae67bb72bec875f1229614eebfa3a3340c1955/image_on_terminal-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "76d9c7d10d77181402e9f53594955064feff847251dcc0ade780cf56f189e7e1",
                "md5": "e078b29a72004cb2bdc7cd556fc226fd",
                "sha256": "7d861dd9572455fd307352c762484cae61e258a0200b3d00abad84e141a01346"
            },
            "downloads": -1,
            "filename": "image-on-terminal-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "e078b29a72004cb2bdc7cd556fc226fd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 5166,
            "upload_time": "2023-10-13T01:21:03",
            "upload_time_iso_8601": "2023-10-13T01:21:03.420776Z",
            "url": "https://files.pythonhosted.org/packages/76/d9/c7d10d77181402e9f53594955064feff847251dcc0ade780cf56f189e7e1/image-on-terminal-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-13 01:21:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "odell0111",
    "github_project": "image-on-terminal",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "image-on-terminal"
}
        
Elapsed time: 0.13677s