From 4e26faf498b84b90ecd1af3bd6c6e1f2f3e44a6e Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Mon, 12 Feb 2024 06:26:14 -0600 Subject: msgviewer: implement inline image viewing Implement inline image viewing for jpeg, png, bmp, tiff, and webp formats. When a user has no configured image filter and the image is supported and the terminal has either sixel or kitty image protocol support, the image will be displayed in the message viewer. Always clear the screen before each draw. This call is necessary in vaxis to allow for images to be cleared properly between renders. There is no performance impact: the call only resets each cell to a blank cell, and aerc will redraw each one already. Changelog-added: Inline image previews when no filter is defined for `image/*` and the terminal supports it. Signed-off-by: Tim Culverhouse Acked-by: Robin Jarry --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'go.mod') diff --git a/go.mod b/go.mod index fd1ea357..fa05f0dd 100644 --- a/go.mod +++ b/go.mod @@ -33,6 +33,7 @@ require ( github.com/stretchr/testify v1.8.4 github.com/syndtr/goleveldb v1.0.0 github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e + golang.org/x/image v0.13.0 golang.org/x/oauth2 v0.7.0 golang.org/x/sys v0.15.0 golang.org/x/tools v0.6.0 @@ -53,7 +54,6 @@ require ( github.com/rogpeppe/go-internal v1.8.1 // indirect github.com/soniakeys/quant v1.0.0 // indirect golang.org/x/crypto v0.17.0 // indirect - golang.org/x/image v0.13.0 // indirect golang.org/x/mod v0.8.0 // indirect golang.org/x/net v0.9.0 // indirect golang.org/x/text v0.13.0 // indirect -- cgit