Package: term-image
Term-ImageDisplay images in the terminal with Python📖Docs║ 
   🏫TutorialContentsInstallationFeaturesDemoQuick StartUsageContributionPlanned FeaturesKnown IssuesFAQsCreditsSponsor This Project⚠️ NOTICE!!! ⚠️The image viewer (CLI and TUI) has been moved totermvisage.InstallationRequirementsOperating System: Unix / Linux / Mac OS X / Windows (limited support, see theFAQs)Python>= 3.7A terminal emulator withanyof the following:support for theKitty graphics protocol.support for theiTerm2 inline image protocol.full Unicode support and ANSI 24-bit color supportPlans to support a wider variety of terminal emulators are in motion(seePlanned Features).StepsThe lateststableversion can be installed fromPyPIwith:pipinstallterm-imageThedevelopmentversion can be installed with:pipinstallgit+https://github.com/AnonymouX47/term-image.gitSupported Terminal EmulatorsSeeherefor 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 underthis discussion.Also, if you have any issue with terminal support, you may report or check information about it in the discussion linked above.FeaturesMultiple image formats (basically all formats supported byPIL.Image.open())Multiple image source types: PIL image instance, local file, URLMultiple image render styles (with automatic support detection)Support for multiple terminal graphics protocols:Kitty,iTerm2Exposes various features of the protocolsTransparency support (with multiple options)Animated image support (including transparent ones)Multiple formats: GIF, WEBP, APNG (and possibly more)Fully controllable iteration over rendered frames of animated imagesImage animation with multiple parametersIntegration into various TUI / terminal-based output libraries.Terminal size awarenessAutomatic and manual image sizingHorizontal and vertical alignmentAutomatic and manual font ratio adjustment (to preserve image aspect ratio)and more... 😁DemoCheck out thisimage viewerbased on this library.Quick StartCreating an instanceInitialize with a file path:fromterm_image.imageimportfrom_fileimage=from_file("path/to/image.png")Initialize with a URL:fromterm_image.imageimportfrom_urlimage=from_url("https://www.example.com/image.png")Initialize with a PIL (Pillow) image instance:fromPILimportImagefromterm_image.imageimportAutoImageimg=Image.open("path/to/image.png")image=AutoImage(img)Drawing/Displaying an ImageThere are two basic ways to draw an image to the terminal screen:Using thedraw()method:image.draw()NOTE:draw()has various parameters for render formatting.Usingprint()with an image render output:print(image)# without formatting# ORprint(f"{image:>200.^100#ffffff}")# with formattingFor animated images, only the former animates the output, the latter only draws the current frame.See thetutorialfor a more detailed introduction.Usage🚧 Under Construction - There will most likely be incompatible changes between minor versions ofversion 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 thedocsfor the User Guide and API Reference.ContributionPlease read through theguidelines.For code contributions, you should also check out thePlanned Features.
If you wish to work on any of the listed features/improvements, please click on the linked issue or go through theissuessection 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 bylabelor simplysearchusing the features's description.Thanks! 💓Planned FeaturesSeehere.Known IssuesSeehere.FAQsSee theFAQssection of the docs.CreditsThe following projects have been (and are still) crucial to the development of this project:PillowbyFredrik Lundh, Jeffrey A. Clark (Alex) and contributorsRequestsbyKenneth Reitz and othersThe logo was composed using resource(s) from the following source(s):Gallery icons created by Andrean Prabowo - FlaticonSponsor This ProjectAny amount will go a long way in aiding the progress and development of this project.
Thank you! 💓