Open muziker opened 4 years ago
Found a fix for this, located here https://github.com/hzeller/timg
I don't know how to compile hiptext anymore. I can't maintain it anymore because the Linux APIs it depended on kept radically changing. So I rewrote hiptext instead as two new and much better projects.
Enjoy!
Also if you want C code that does what hiptext does with the least amount of effort possible please see:
I don't know how to compile hiptext anymore. I can't maintain it anymore because the Linux APIs it depended on kept radically changing.
I was actually able to compile and run hiptext, that took about an hour to figure out. All I had to do are couple replacements in src/movie.cc
to address #36
PIX_FMT_RGB24
with AV_PIX_FMT_RGB24
avcodec_alloc_frame
with av_frame_alloc
And borrowed an older Ragel version 6 from another machine to build pixel_parce.cc
(mine had version 7 which had a known issue to throw ragel: input.c:517: input_undo_prepend_tree: Assertion `si->queue.head != 0 && ( si->queue.head->type == SB_TOKEN || si->queue.head->type == SB_IGNORE )' failed. error upon compilation attempt). That's for now, and I agree if they keep changing APIs (and they will eventually do) you'll get tired pretty soon by constantly accommodating the changes.
Anyways, I'm shopping for the best terminal image viewer, sorry about looking the other way, but you know, 256 colors are out of fashion nowadays, as there are terminals and image viewers which support True Color.
If you send me a pull request with your changes that make it build, I'll merge them.
I believe the printimage.com program is the best. It uses 24-bit by default. You have to pass the -x
flag if you want the retro appeal of 256 color.
As a matter of fact, I've found an existing #52. CI fails though, perhaps because of an older version of ffmpeg library.
Merged
FWIW, I was able to build hiptext
on Linux Mint 20.3 (packages based
on Ubuntu 20.04 LTS). I hit a roadblock in that libfreetype-dev
no
longer includes the freetype-config
utility, and in a few minutes of
poking I couldn't find an obvious way to get it.
I hacked around it by patching configure.ac
to remove the check:
diff --git a/configure.ac b/configure.ac
index d1c8217..0a4ece8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -47,9 +47,6 @@ AC_SUBST(LIBGFLAGS_CFLAGS)
AC_SUBST(LIBGFLAGS_LIBS)
AC_CHECK_PROGS(FREETYPE, freetype-config)
-if test -z "$FREETYPE"; then
- AC_MSG_ERROR([error: libfreetype-dev is required])
-fi
LIBFREETYPE_CFLAGS="`$FREETYPE --cflags`"
LIBFREETYPE_LIBS="`$FREETYPE --libs`"
AC_SUBST(LIBFREETYPE_CFLAGS)
…and then patching the generated Makefile
to manually configure the
Freetype build flags:
--- Makefile.old 2022-07-08 17:46:31.999241774 -0700
+++ Makefile 2022-07-08 17:45:23.812035049 -0700
@@ -519,4 +519,4 @@
LIBAVUTIL_LIBS = -lavutil
-LIBFREETYPE_CFLAGS =
-LIBFREETYPE_LIBS =
+LIBFREETYPE_CFLAGS = -I/usr/include/freetype2
+LIBFREETYPE_LIBS = -lfreetype
LIBGFLAGS_CFLAGS =
That said, I later remembered how to find printimage.com
(I knew there
was a newer one but couldn't find it by searching @jart's repositories
for image
:-) ), which I agree is better anyway, so I'm mostly posting
this "just in case" it helps someone later.
Since you put in the work, if you send me a PR I'll hit merge.
Sure; I cleaned up the patch a bit and sent #60.
The build instructions in the readme don't work, but just cloning the repo, running ./autogen.sh
, ./configure
and then make
do work.
Hi there, there are some changes in ffmpeg and so the interface call signatures have been changed. Update this please, so we can all enjoy the ascii goodness