danielgatis / imgcat Goto Github PK
View Code? Open in Web Editor NEWDisplay images and gifs in your terminal.
License: MIT License
Display images and gifs in your terminal.
License: MIT License
Hey! Super cool tool!
I've installed this on a linux machine. The images appear pixelated while using the default terminal or even tabby
Here is an example of using imgcat:
And the image opened normally
is there any getting around the pixelation?
❯ imgcat JIF.png
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x341535]
goroutine 1 [running]:
github.com/creack/pty.Getsize(...)
/home/runner/go/pkg/mod/github.com/creack/pty@v1.1.17/winsize.go:23
main.scale({0xc000088220, 0x1, 0x111e7a})
/home/runner/work/imgcat/imgcat/main.go:148 +0x75
main.main()
/home/runner/work/imgcat/imgcat/main.go:277 +0x8f
NativeCommandExitException: Program "imgcat.exe" ended with non-zero exit code: 2.
I get this whenever I attempt to open any image file
Currently it shows Invalid MIME type
for .ico images.
This is a great tool. Just wanted to mention that it adds spurious color to grayscale images. Glancing at the code, this is probably related to the resampling filter during resizing.
I installed imgcat
with scoop
and run it to display avatar.png
.
imgcat
throw error with below:
(base) PS C:\Users\mago\Downloads> imgcat avatar.png
2024/03/19 10:55:42 failed to get the terminal size: unsupported
panic: failed to get the terminal size: unsupported
goroutine 1 [running]:
log.Panicf({0x8cd730, 0xc0000060c0}, {0xc000109f10, 0x18cd63, 0x18cd64})
/opt/hostedtoolcache/go/1.17.7/x64/src/log/log.go:361 +0x67
main.scale({0xc000064000, 0x1, 0x18cd64})
/home/runner/work/imgcat/imgcat/main.go:151 +0xe8
main.main()
/home/runner/work/imgcat/imgcat/main.go:287 +0x15f
Thanks a lot for Imgcat! It's the only way I have found to preview images in a Windows command prompt.
I am trying to get Imgcat and Vifm work together on Windows 10, using Imgcat to show images in Vifm's preview pane.
Imgcat works fine by itself in cmd prompt but it does not seem to work from Vifm, producing the error message:
failed to get the console state: The handle is invalid.
Since I wasn't sure where the problem is rooted, I first asked over at Vifm. From what I understand Vifm expects some kind of output while Imgcat prints directly to the console.
A workaround was tried but didn't help. Here's the Question over at Vifm's github for reference:
vifm/vifm#671
I am not sure if it is possible on Windows at all, but could Imgcat be made to give Vifm the right output somehow?
Using the snap package, imgcat
returns permission denied error when a file is given as input in the argument.
However, it works fine when reading standard input (e.g. cat <image>.jpg | imgcat
). Here is an example:
I have tested it on Ubuntu 18.04 LTS & 20.04 LTS. Thanks for the follow-up in advance!
edit: typo
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.