Display image in internactive notebooks
Project description
Interactive Show Image
Display images in Jupyter web UI, that is JupyterLab and Jupyter Notebook.
Encodes the image directly into HTML (base64) without going through matplotlib.
The compression format is customizable. A single function call can show multiple images in a grid.
show(img_1, img_2)will draw each image on a separate rowshow([img_1, img_2])will draw both images in one rowshow([img_1, img_2], [img_3, img_4])will draw two rows of two images
Specifying the format:
show(..., fmt='webp'): image format, usually png jpeg webpshow.set_default_image_format('webp')- The default is
png, please usewebporjpegto reduce notebook file size
Whether to try converting unusual shapes and datatypes to the needed RGB:
show(..., adapt=True or False)
Convenience functions imread, imwrite are also provided (based on PIL).
Demo
Try the demo notebook.
Installation
pip install show-image
or
- Include the file
show_image.pyin your project - Ensure libraries are installed:
Pillow numpy matplotlib ipython
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file show-image-0.0.1.tar.gz.
File metadata
- Download URL: show-image-0.0.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2bc57b7ec711a894e37c617f5dc136e3e1b71935913036e35f52f7560629ceab
|
|
| MD5 |
25c03db06f02af02199a370b51fe53da
|
|
| BLAKE2b-256 |
c2aaa6a5e47f03e9dada33eeb900eeea5c8e067e8600bb8e7d5868876e16528e
|
File details
Details for the file show_image-0.0.1-py3-none-any.whl.
File metadata
- Download URL: show_image-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f82f35b9c335c1d3ea950780f52af1833fc1491f025e63711dfca8213edff74f
|
|
| MD5 |
749934c19bc8ba8e16ba91fb4aa58460
|
|
| BLAKE2b-256 |
0717967ac6ce91d11eb474d526ca68e54f336f4527f491b8ea3ba6232f79788c
|