Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
⚠️ NOTICE!!! ⚠️
The image viewer (CLI and TUI) has been moved to termvisage.
Operating System: Unix / Linux / Mac OS X / Windows (limited support, see the FAQs)
Python >= 3.7
A terminal emulator with any of the following:
Plans to support a wider variety of terminal emulators are in motion (see Planned Features).
The latest stable version can be installed from PyPI with:
pip install term-image
The development version can be installed with:
pip install git+https://github.com/AnonymouX47/term-image.git
See here for a list of tested terminal emulators.
If you've tested this library on any other terminal emulator that meets the requirements for any of the render styles, please mention the name (and version) in a new thread under this discussion.
Also, if you have any issue with terminal support, you may report or check information about it in the discussion linked above.
PIL.Image.open()
)Check out this image viewer based on this library.
Initialize with a file path:
from term_image.image import from_file
image = from_file("path/to/image.png")
Initialize with a URL:
from term_image.image import from_url
image = from_url("https://www.example.com/image.png")
Initialize with a PIL (Pillow) image instance:
from PIL import Image
from term_image.image import AutoImage
img = Image.open("path/to/image.png")
image = AutoImage(img)
There are two basic ways to draw an image to the terminal screen:
Using the draw()
method:
image.draw()
NOTE: draw()
has various parameters for render formatting.
Using print()
with an image render output:
print(image) # without formatting
# OR
print(f"{image:>200.^100#ffffff}") # with formatting
For animated images, only the former animates the output, the latter only draws the current frame.
See the tutorial for a more detailed introduction.
🚧 Under Construction - There will most likely be incompatible changes between minor versions of version zero!
If you want to use this library in a project while it's still on version zero, ensure you pin the dependency to a specific minor version e.g >=0.4,<0.5
.
See the docs for the User Guide and API Reference.
Please read through the guidelines.
For code contributions, you should also check out the Planned Features. If you wish to work on any of the listed features/improvements, please click on the linked issue or go through the issues section and join in on an ongoing discussion about the task or create a new issue if one hasn't been created yet, so that the implementation can be discussed.
Hint: You can filter issues by label or simply search using the features's description.
Thanks! 💓
See here.
See here.
See the FAQs section of the docs.
The following projects have been (and are still) crucial to the development of this project:
The logo was composed using resource(s) from the following source(s):
Any amount will go a long way in aiding the progress and development of this project. Thank you! 💓
FAQs
Display images in the terminal
We found that term-image demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.