Giter VIP home page Giter VIP logo

imgcat's Issues

pixelated images?

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:

Screenshot from 2023-08-17 10-17-55

And the image opened normally

Screenshot from 2023-08-17 10-18-35

is there any getting around the pixelation?

panic: runtime error: invalid memory address or nil pointer dereference

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

Adds spurious color to grayscale 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.

Windows Terminal run error with panic

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

Imgcat and Vifm

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?

Permission denied when reading files

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:

imgcat

I have tested it on Ubuntu 18.04 LTS & 20.04 LTS. Thanks for the follow-up in advance!

edit: typo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.