Metadata-Version: 2.4
Name: image-in-terminal
Version: 1.3
Summary: Simple Python package to display a single or multiple images in the terminal by converting it into text
Home-page: https://github.com/odellgm/image-in-terminal
Author: Odell
Author-email: odellgm11012001@gmail.com
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.
        
Project-URL: Homepage, https://github.com/odellgm/image-in-terminal
Project-URL: Repository, https://github.com/odellgm/image-in-terminal
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
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Environment :: Console
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rich
Requires-Dist: pytest
Requires-Dist: requests
Requires-Dist: pillow
Requires-Dist: argparse
Requires-Dist: rich-argparse
Dynamic: license-file

<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" alt="pypackage"/>
  </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
```bash
pip install image-in-terminal
```

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

### From 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 script:
```
from imageinterminal import display_image
display_image("myImage.jpg")

# Do not display
# img_str = display_image("myImage.jpg", display=False)
```

## Help menu
```
imageinterminal -h
Usage:
  iit image_uris [options]

                                                                                   Image In Terminal
                                                                                         v1.3
                                                                                       by Odell
                                                                                       2023-2025
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 N         Destination width of the image(s).
  -wt, --whiteness-threshold N.
                        (float [0 - 1]). Pixels with a whiteness higher than this value will be inverted.
  -dt, --darkness-threshold N.
                        (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.
  -ll, --log-level N    Log level. Default: 20. CRITICAL = 50, FATAL = CRITICAL, ERROR = 40, WARNING = 30, INFO = 20, DEBUG = 10, NOTSET = 0

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).
```

## Donate
If you find my work useful and want to encourage further development, you can do so by donating

[//]: # ([![Donate]&#40;https://app.oxapay.com/media/btn/light-btn.png&#41;]&#40;https://oxapay.com/donate/42319117&#41;)

<a href="https://oxapay.com/donate/42319117" target="_blank"> <img src="https://app.oxapay.com/media/btn/light-btn.png" style="width: 200px"> </a>

### TON
```
UQCyCnWVYOmv97idVFZ4tIewToZacRhYVwfGNU658fN5w3Kl
```
### Bitcoin
```
bc1qvnu237er6rxt8cazze6lx3dme66n60gjwgh2mx
```
#### Speed Lightning Address username
```
bytechanger@speed.app
```

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


