Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eddieantonio/imgcat
It's like cat, but for images.
https://github.com/eddieantonio/imgcat
256-colors ansi cli color hacktoberfest image imgcat iterm2 terminal
Last synced: 5 days ago
JSON representation
It's like cat, but for images.
- Host: GitHub
- URL: https://github.com/eddieantonio/imgcat
- Owner: eddieantonio
- License: isc
- Created: 2014-12-11T07:21:31.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2023-12-18T13:39:50.000Z (11 months ago)
- Last Synced: 2024-04-09T14:49:39.657Z (7 months ago)
- Topics: 256-colors, ansi, cli, color, hacktoberfest, image, imgcat, iterm2, terminal
- Language: C
- Homepage:
- Size: 1.43 MB
- Stars: 852
- Watchers: 9
- Forks: 34
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
imgcat
======[![Build Status](https://github.com/eddieantonio/imgcat/workflows/Build%20and%20test%20imgcat/badge.svg\?branch\=master)](https://github.com/eddieantonio/imgcat/actions)
It's like `cat` but for images.
Install
-------On macOS:
```sh
brew install eddieantonio/eddieantonio/imgcat
```**Important**: [See below](#note-on-iterm2s-shell-integration) if
you're using iTerm2 3.0 with shell integration installed.For other platforms, see [Build](#build).
Usage
-----```sh
imgcat some_image.jpg
```See the [manpage](./docs/imgcat.1.md) for more invocations.
Note on iTerm2's shell integration
----------------------------------If you install iTerm2's [shell integration], chances are you also
installed its additional scripts, including one called `imgcat`.
**iTerm's `imgcat` overrides this program by default**. To see if this
is happening to you, use `which` to determine where your shell is
finding imgcat:which imgcat
If it says `imgcat: aliased to /Users/yourusername/.iterm2/imgcat`, then
you must edit your shell startup file and add `unalias imgcat` **after**
the line that sources iTerm2's script. For example:test -e ${HOME}/.iterm2_shell_integration.zsh && source ${HOME}/.iterm2_shell_integration.zsh
unalias imgcat[shell integration]: https://www.iterm2.com/documentation-shell-integration.html
Build
-----### Clone
You must use `git clone --recurse-submodules` to clone this repository with its dependency, [CImg]:
git clone --recurse-submodules https://github.com/eddieantonio/imgcat.git
### Requirements
To build from source, you need the following:
- GNU make
- pkg-config
- ncurses with header filesOn Debian/Ubuntu/Mint/etc. you can get these packages with this
command:sudo apt-get install build-essential pkg-config libncurses5-dev
### Recommended dependencies
These dependencies are not necessary, but if `pkg-config` manages to
find a compatible version on the system, `imgcat` will link to it!- libpng (any 1.x version supported by [CImg])
- libjpeg (any version supported by [CImg])On Debian/Ubuntu/Mint/etc. you can get these packages with this
command:sudo apt-get install libpng-dev libjpeg-dev
Then:
```sh
./configure
make
```Install
-------To install to `/usr/local`:
```sh
make install
```To change the default prefix, simply provide `PREFIX=...`
to `make install`:```sh
make install PREFIX=/opt
```Acknowledgements
----------------- Uses the [CImg], distributed under the [CeCILL-C] license.
- 256 Color chart and data from Jason Milkin's [public domain chart][256svg].[CImg]: https://github.com/dtschump/CImg
[CeCILL-C]: http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.txt
[256svg]: https://gist.github.com/jasonm23/2868981License
-------Copyright © 2014–2023 Eddie Antonio Santos.
Distributed under the terms of the [ISC license](./LICENSE).