Skip to content

Commit e8da113

Browse files
committed
Add more image formats, update docs
1 parent 808cb8f commit e8da113

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# icat
22

3-
Go version of image cat (or `imgcat`) with `webp`, `tiff` and (optional) `HEIF` image support (on top of standard Go images formats `gif`, `jpg`, `png`) and URL support and fallback to ASCII art.
3+
Go version of image cat (or `imgcat`) with `bmp`, `riff`,`tiff`, `vp8`, `vp8l`, `webp` and (optional) `HEIF` image support (on top of standard Go images formats `gif`, `jpg`, `png`) and URL support and fallback to ASCII art.
44
`PrintImageFile` and `PrintImageURL` will print the image to the terminal, trying to figure out which terminal you are using and fallback to ASCII art if the terminal does not support images.
55

66
## Cmd line version
@@ -9,8 +9,26 @@ Go version of image cat (or `imgcat`) with `webp`, `tiff` and (optional) `HEIF`
99

1010
```shell
1111
go install github.com/hilli/icat/cmd/icat@latest
12+
# With HEIF support:
13+
go install -tags heif github.com/hilli/icat/cmd/icat@latest
1214
```
1315

16+
*Note*: To enable `heif` support, you need to have `libheif` installed on your system. On macOS, you can install it via Homebrew:
17+
18+
```shell
19+
brew install libheif
20+
```
21+
22+
`libheif` should be available on most package managers.
23+
24+
Alternatively, you can download the binary from the [releases page](https://github.com/hilli/icat/releases) or install via [Homebrew](https://brew.sh/):
25+
26+
```shell
27+
brew install hilli/tap/icat
28+
```
29+
30+
which unfortunately does not support the `heif` files (Cross compilation is hard with C extensions, mkay).
31+
1432
### CLI Usage
1533

1634
```shell

print_image.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ import (
1515
ascii "github.com/qeesung/image2ascii/convert"
1616

1717
_ "golang.org/x/image/bmp"
18+
_ "golang.org/x/image/riff"
1819
_ "golang.org/x/image/tiff"
20+
_ "golang.org/x/image/vp8"
21+
_ "golang.org/x/image/vp8l"
1922
_ "golang.org/x/image/webp"
2023
)
2124

0 commit comments

Comments
 (0)