Metadata-Version: 2.1
Name: teimpy
Version: 0.0.3
Summary: Python libray for displaying images on terminal
Home-page: https://github.com/ar90n/teimpy
License: MIT
Keywords: sixel,terminal,graphics
Author: Masahiro Wada
Author-email: argon.argon.argon@gmail.com
Requires-Python: >=3.6,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Dist: numpy (>=1.16.0,<2.0.0)
Requires-Dist: pillow (>=6.0.0,<7.0.0)
Requires-Dist: pysixel (>=0.1.11,<0.2.0)
Project-URL: Repository, https://github.com/ar90n/teimpy
Description-Content-Type: text/markdown

# teimpy
[![PyPI version](https://badge.fury.io/py/teimpy.svg)](https://badge.fury.io/py/teimpy)
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/amplify-education/serverless-domain-manager/master/LICENSE)
[![Build Status](https://travis-ci.org/ar90n/teimpy.svg?branch=master)](https://travis-ci.org/ar90n/teimpy)

Python library for displaying image on terminal.

## Installation

```bash
$ pip
```

## Example

```python
import numpy as np
from teimpy import get_drawer, Mode

R = np.array([1.0, 0, 0])
G = np.array([0, 1.0, 0])
B = np.array([0, 0, 1.0])

def _get_color(x, y):
    tmp = (y * (1.0 - x) * R + (1.0 -y ) * x * G + (1.0 - y) * (1.0 - x) * B)
    return (255 * tmp).astype(np.uint8)

tics = np.linspace(0, 1, 128)
xs, ys = np.meshgrid(tics, tics)
buffer = np.vectorize(_get_color, signature='(),()->(3)')(xs, ys)
print(get_drawer(Mode.ITERM2_INLINE_IMAGE).draw(buffer))
```
![Result of doit.py](https://github.com/ar90n/teimpy/raw/docs/doit.png)


## Feature

* Resize images to fit terminal size.
* Drawing with iterm2 inline image.
![Drawing with iterm2 inline image](https://github.com/ar90n/teimpy/raw/docs/inline_image.png)
* Drawing with Braille fonts.
![Drawing with Braille ofnts](https://github.com/ar90n/teimpy/raw/docs/braille.png)
* Drawing with half block fonts.
![Drawing with half block fonts](https://github.com/ar90n/teimpy/raw/docs/half_block.png)


## License
This software is released under the MIT License, see [LICENSE](LICENSE).

