All Projects → wookayin → python-imgcat

wookayin / python-imgcat

Licence: MIT license
🖼 imgcat in Python (for iTerm2)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to python-imgcat

Dotfiles
👾 ~/
Stars: ✭ 91 (-50.54%)
Mutual labels:  iterm2
Dotfiles
📍 My dotfiles for macOS using Fish/Zsh, Neovim, and Tmux
Stars: ✭ 151 (-17.93%)
Mutual labels:  iterm2
Bv
Quickly view satellite imagery, hyperspectral imagery, and machine learning image outputs directly in your iTerm2 terminal.
Stars: ✭ 215 (+16.85%)
Mutual labels:  iterm2
Mac Bootstrap
💻 Provision a new Mac for web development with dotfiles + Fish/Zsh, Neovim, and Tmux
Stars: ✭ 96 (-47.83%)
Mutual labels:  iterm2
Iterm2 Icons
Replacement icon for iTerm2 or other macOS terminal apps. Designed for Big Sur.
Stars: ✭ 146 (-20.65%)
Mutual labels:  iterm2
Iterm2 Borderless
Borderless iTerm2 patch with a few extra features
Stars: ✭ 165 (-10.33%)
Mutual labels:  iterm2
Gvcci
color extraction to turn images into 16 color palettes
Stars: ✭ 86 (-53.26%)
Mutual labels:  iterm2
dotfiles
Blugil's dotfiles
Stars: ✭ 23 (-87.5%)
Mutual labels:  iterm2
Terminal Icons
Beautiful icons for your favourite terminal apps like Hyper and iTerm2
Stars: ✭ 149 (-19.02%)
Mutual labels:  iterm2
Givegif
GIFs on the command line
Stars: ✭ 212 (+15.22%)
Mutual labels:  iterm2
Alfred Tty
Alfred Workflow to quickly switch between or close iTerm windows, tabs and panes based on title and tty
Stars: ✭ 99 (-46.2%)
Mutual labels:  iterm2
Iterm2 Material Design
A theme / color scheme for iTerm2 based on Google's Material Design Color Palette
Stars: ✭ 1,741 (+846.2%)
Mutual labels:  iterm2
Sendcode
Send code and text to macOS and Linux Terminals, iTerm, ConEmu, Cmder, Tmux, Terminus; R (RStudio), Julia, IPython.
Stars: ✭ 166 (-9.78%)
Mutual labels:  iterm2
Iterm2 Zmodem
Installing Z-Modem integration for iTerm2 with Homebrew
Stars: ✭ 95 (-48.37%)
Mutual labels:  iterm2
Iterm2 Imagetools
Display images in the command line with iterm2.
Stars: ✭ 232 (+26.09%)
Mutual labels:  iterm2
Itermplot
An awesome iTerm2 backend for Matplotlib, so you can plot directly in your terminal.
Stars: ✭ 1,267 (+588.59%)
Mutual labels:  iterm2
Aura Theme
💅 A beautiful dark theme for your favorite apps.
Stars: ✭ 159 (-13.59%)
Mutual labels:  iterm2
halcyon-iterm
Halcyon Theme for iTerm2
Stars: ✭ 49 (-73.37%)
Mutual labels:  iterm2
Iterm Fish Fisher Osx
Complete guide and Bash script to install Command Line Tools + Homebrew + iTerm2 + Fish Shell + Fisher + Plugins for development purposes
Stars: ✭ 249 (+35.33%)
Mutual labels:  iterm2
Iterm2 Night Owl
A port of the VS Code Night Owl theme to iTerm2.
Stars: ✭ 179 (-2.72%)
Mutual labels:  iterm2

imgcat

pypi Build Status license

The imgcat CLI, written in Python (and Python API, too).

It works with iTerm2, and even inside tmux.

Installation and Usage

pip install imgcat

Command-line interface (similar to iTerm2's imgcat):

$ imgcat local_image.png
$ imgcat a.png b.png c.png
$ cat from_stdin.gif | imgcat

# height is 10 lines
$ imgcat a.png --height 10

Python API:

>>> from imgcat import imgcat

# from the content of image (e.g. buffer in python3, str in python2)
>>> imgcat(open("./local_image.png"))

# or numpy arrays!
>>> im = skimage.data.chelsea()   # [300, 451, 3] ndarray, dtype=uint8
>>> imgcat(im, height=7)

# matplotlib, PIL.Image, etc.
>>> imgcat(Image.fromarray(im))

>>> import matplotlib.pyplot as plt
>>> fig, ax = plt.subplots(); ax.plot([1, 2, 3, 4, 5])
>>> imgcat(fig)

Matplotlib Backend: module://imgcat

MPLBACKEND="module://imgcat" python draw_matplotlib.py
>>> import matplotlib
>>> matplotlib.use("module://imgcat")

>>> import matplotlib.pyplot as plt
>>> fig, ax = plt.subplots()
>>> ax.text(0.5, 0.5, "Hello World!");
>>> fig.show()
# an image shall be displayed on your terminal!

IPython magic (works both in terminal and notebook)

%load_ext imgcat
%imgcat skimage.data.chelsea()

Notes

Related Projects

License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].