image-in-terminal


Nameimage-in-terminal JSON
Version 1.2.6 PyPI version JSON
download
home_pagehttps://github.com/odell0111/image-in-terminal
SummarySimple Python package to display a single or multiple images in the terminal by converting it into text
upload_time2024-01-14 12:06:43
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 image on terminal imageinterminal 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.
            <div align="center">
  <a href='https://pypi.org/project/image-in-terminal'>
    <img src="https://img.shields.io/pypi/v/image-in-terminal?label=PyPI%20Package">
  </a>
  <img src="https://static.pepy.tech/badge/image-in-terminal/month"/>
  <h2>Image In Terminal</h2>
</div>

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, unicode characters and there should be no spacing between lines (0 line-spacing).

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

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

```
imageinterminal -h

Usage:
  imageinterminal image_uris [options]

                                                  Image In Terminal
                                                        v1.2.5
                                                       by Odell
                                                      2023-2024
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:
  -w, --width WIDTH     Destination width of the image(s).
  -wt, --whiteness-threshold WHITENESS_THRESHOLD
                        (float [0 - 1]). Pixels with a whiteness higher than this value will be inverted.
  -dt, --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.
  -pp, --procedural-printing
                        The image(s) pixels will be printed one by one procedurally instead of printing/displaying the
                        entire image at once. Useful when printing/displaying high resolution images.
  -nc, --no-center      Do not center image(s).
  -nf, --no-fit         Do not automatically fit image(s) width to terminal width when -w/--width is not specified.

Miscellaneous:
  -h, --help            Show this help message and exit.
  -v, --version         Show version number and exit.

Simple Python package to display a single or multiple images in the terminal by converting it into text. For the
desired behavior to be achieved, the terminal must support colors, unicode characters and there should be no spacing
between lines (0 line-spacing).
```

**From the terminal:**
```
imageinterminal "myImage.jpg"
iit "https://images/exampleImage.jpg" "myOtherImage.png" -w 128
iit "myImagesOnWhiteBackgrounds" --width 256 -wt 0.97 
iit myImage2.png --no-fit --no-center
```

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

<div align='center'>
  <h2>Screenshots</h2>
  <p>JPG 1440x1800</p><br/>
  <img src="https://raw.githubusercontent.com/odell0111/image-in-terminal/main/Screenshots/animal_png_x1440.png"><br/><br/>
  <p>JPG 256x256</p><br/>
  <img src="https://raw.githubusercontent.com/odell0111/image-in-terminal/main/Screenshots/krita_jpg_x256.png"><br/><br/>
  <p>PNG 256x256</p><br/>
  <img src="https://raw.githubusercontent.com/odell0111/image-in-terminal/main/Screenshots/ar_png_x256.png"><br/><br/>
  <p>Procedural Printing</p><br/>
  <img src="https://raw.githubusercontent.com/odell0111/image-in-terminal/main/Screenshots/procedural_printing.gif"><br/><br/>
</div>



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/odell0111/image-in-terminal",
    "name": "image-in-terminal",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "terminal,image,imageonterminal,image-on-terminal,image on terminal,imageinterminal,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/2e/3e/481461fbe1a8da0b08fdec0ebb5408f47cc3fa3a71ea1343c95f9a4236ad/image-in-terminal-1.2.6.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\r\n  <a href='https://pypi.org/project/image-in-terminal'>\r\n    <img src=\"https://img.shields.io/pypi/v/image-in-terminal?label=PyPI%20Package\">\r\n  </a>\r\n  <img src=\"https://static.pepy.tech/badge/image-in-terminal/month\"/>\r\n  <h2>Image In Terminal</h2>\r\n</div>\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, unicode characters and there should be no spacing between lines (0 line-spacing).\r\n\r\n## Installation\r\n```pip install image-in-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\nimageinterminal -h\r\n\r\nUsage:\r\n  imageinterminal image_uris [options]\r\n\r\n                                                  Image In Terminal\r\n                                                        v1.2.5\r\n                                                       by Odell\r\n                                                      2023-2024\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  -w, --width WIDTH     Destination width of the image(s).\r\n  -wt, --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\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  -pp, --procedural-printing\r\n                        The image(s) pixels will be printed one by one procedurally instead of printing/displaying the\r\n                        entire image at once. Useful when printing/displaying high resolution images.\r\n  -nc, --no-center      Do not center image(s).\r\n  -nf, --no-fit         Do not automatically fit image(s) width to terminal width when -w/--width is not specified.\r\n\r\nMiscellaneous:\r\n  -h, --help            Show this help message and exit.\r\n  -v, --version         Show version number and exit.\r\n\r\nSimple Python package to display a single or multiple images in the terminal by converting it into text. For the\r\ndesired behavior to be achieved, the terminal must support colors, unicode characters and there should be no spacing\r\nbetween lines (0 line-spacing).\r\n```\r\n\r\n**From the terminal:**\r\n```\r\nimageinterminal \"myImage.jpg\"\r\niit \"https://images/exampleImage.jpg\" \"myOtherImage.png\" -w 128\r\niit \"myImagesOnWhiteBackgrounds\" --width 256 -wt 0.97 \r\niit myImage2.png --no-fit --no-center\r\n```\r\n\r\n**From a python script:**\r\n```\r\nfrom imageinterminal import display_image\r\ndisplay_image(\"myImage.jpg\")\r\n```\r\n\r\n<div align='center'>\r\n  <h2>Screenshots</h2>\r\n  <p>JPG 1440x1800</p><br/>\r\n  <img src=\"https://raw.githubusercontent.com/odell0111/image-in-terminal/main/Screenshots/animal_png_x1440.png\"><br/><br/>\r\n  <p>JPG 256x256</p><br/>\r\n  <img src=\"https://raw.githubusercontent.com/odell0111/image-in-terminal/main/Screenshots/krita_jpg_x256.png\"><br/><br/>\r\n  <p>PNG 256x256</p><br/>\r\n  <img src=\"https://raw.githubusercontent.com/odell0111/image-in-terminal/main/Screenshots/ar_png_x256.png\"><br/><br/>\r\n  <p>Procedural Printing</p><br/>\r\n  <img src=\"https://raw.githubusercontent.com/odell0111/image-in-terminal/main/Screenshots/procedural_printing.gif\"><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 a single or multiple images in the terminal by converting it into text",
    "version": "1.2.6",
    "project_urls": {
        "Homepage": "https://github.com/odell0111/image-in-terminal",
        "repository": "https://github.com/odell0111/image-in-terminal"
    },
    "split_keywords": [
        "terminal",
        "image",
        "imageonterminal",
        "image-on-terminal",
        "image on terminal",
        "imageinterminal",
        "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": "9590acfde7d2eb970375007011a1c3daa01c53f0eb170aa602f3fbbc6eeb0ccc",
                "md5": "fa0b5af0124fbb4055678fd59b72e6b9",
                "sha256": "67dc7cb18e5a2c4abdf726b7c2df8ead6ddd11d07cb9c36bb0d28255cd0e5023"
            },
            "downloads": -1,
            "filename": "image_in_terminal-1.2.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fa0b5af0124fbb4055678fd59b72e6b9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 8477,
            "upload_time": "2024-01-14T12:06:40",
            "upload_time_iso_8601": "2024-01-14T12:06:40.430082Z",
            "url": "https://files.pythonhosted.org/packages/95/90/acfde7d2eb970375007011a1c3daa01c53f0eb170aa602f3fbbc6eeb0ccc/image_in_terminal-1.2.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2e3e481461fbe1a8da0b08fdec0ebb5408f47cc3fa3a71ea1343c95f9a4236ad",
                "md5": "cefd8f3df4b871fecf4f5ea4f7e8f981",
                "sha256": "b115035ff9983fa063725a36603c4e42a33679bfe10b1baf09497cf573d02356"
            },
            "downloads": -1,
            "filename": "image-in-terminal-1.2.6.tar.gz",
            "has_sig": false,
            "md5_digest": "cefd8f3df4b871fecf4f5ea4f7e8f981",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 6584,
            "upload_time": "2024-01-14T12:06:43",
            "upload_time_iso_8601": "2024-01-14T12:06:43.246786Z",
            "url": "https://files.pythonhosted.org/packages/2e/3e/481461fbe1a8da0b08fdec0ebb5408f47cc3fa3a71ea1343c95f9a4236ad/image-in-terminal-1.2.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-14 12:06:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "odell0111",
    "github_project": "image-in-terminal",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "image-in-terminal"
}
        
Elapsed time: 0.17279s