Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package request: timg terminal image viewer #7301

Closed
1 task done
hzeller opened this issue Aug 11, 2021 · 6 comments
Closed
1 task done

Package request: timg terminal image viewer #7301

hzeller opened this issue Aug 11, 2021 · 6 comments
Labels
package request A new package was requested.

Comments

@hzeller
Copy link

hzeller commented Aug 11, 2021

Requesting new package


Package description

timg is a terminal image and video viewer that uses Unicode block characters to display images (alternatively can show these in high resolution if kitty or iterm2 protocol is implemented).

Images are shown nicely in termux with it.

Link to home page and sources

  1. Home page: https://timg.sh/ (same as github)
  2. Source code: https://github.com/hzeller/timg/

Additional information

  • Have you compiled or tried to compile the package on device?

Personally I did not, but as the author of timg, I received an issue ( hzeller/timg#61 ) with the request to get it into termux; that user did compile timg successfully for termux, but would've liked smaller dependencies. I added a way to have a low-dependency (reduced feature) timg.

  • If it did work then please share build steps and any patches that you had to apply.
    Adding @bropines to this thread who did successfully compile timg.
@ghost ghost added the package request A new package was requested. label Aug 11, 2021
ghost pushed a commit that referenced this issue Aug 11, 2021
Requested in #7301
@ghost
Copy link

ghost commented Aug 11, 2021

With reduced dependencies, wouldn't be this functional analog of https://github.com/nabijaczleweli/termimage (this one has been already packaged)?

@bropines
Copy link

bropines commented Aug 11, 2021

They are really similar, but this package cannot play videos, and timg has this capability. Within 3 hours, I will describe the entire process of building the current version of the application.

@hzeller
Copy link
Author

hzeller commented Aug 11, 2021

I don't know termimage, but it looks like it does half-block pixels but not the quarter block rendering that timg provides (thus higher horizontal spacial resolution in timg). In general it does not seem to have any of the useful features of timg as a daily driver, such as showing images in a grid or using custom background color patterns etc.

(disclaimer: I am the author of timg so I know a lot more about the features of timg than termimage)

@ghost
Copy link

ghost commented Aug 11, 2021

They are really similar, but this package cannot play videos

As far I understand, with reduced dependencies timg can't play videos as well.

Package has been added, pkg install timg. It is available on main repository server now and should be delivered to mirrors in few hours. I have used flags as in hzeller/timg#61 (comment).

@ghost ghost closed this as completed Aug 11, 2021
@hzeller
Copy link
Author

hzeller commented Aug 11, 2021

yes, if ffmpeg video decoding is disabled at build time, it won't be able to play videos.

@bropines
Copy link

Так. Как оказывается все нужные зависимости были, но я их не нашел под стандартными названиями. В итоге все нужные зависимости для программы есть, за исключением openslide. Я написал порядок установки, который можно поставить в скрипт установки. Все зависимости кроме openslide имеются в крупных пакетах таких как ffmpeg, поэтому его тоже надо ставить.
Вот скрипт:
`apt install cmake git clang pkg-config
apt install libjpeg-turbo libexif ffmpeg graphicsmagick

git clone https://github.com/hzeller/timg.git
cd timg
mkdir build
cd build

cmake ../ -DWITH_VIDEO_DECODING=on - DWITH_OPENSLIDE_SUPPORT=off -DWITH_GRAPHICSMAGICK=on -DWITH_TURBOJPEG=on -DWITH_STB_IMAGE=off
make`

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package request A new package was requested.
Projects
None yet
Development

No branches or pull requests

2 participants