Giter Club home page Giter Club logo

chafa's People

Contributors

begasus avatar biswa96 avatar cdluminate avatar data-man avatar delgan avatar dnkl avatar eclipseo avatar ehaupt avatar felixonmars avatar freed-wu avatar guardkenzie avatar hodefoting avatar hpjansson avatar jubalh avatar launchlee avatar mikelolasagasti avatar mjunix avatar oshaboy avatar oupson avatar rarguello avatar rojnwa avatar sfllaw avatar sitiom avatar sotpapathe avatar sthibaul avatar sudhackar avatar timgates42 avatar vmedea avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chafa's Issues

Last line in terminal while playing animation is not used / empty / only cursor

Hello
And I start with the highest five for this amazing stuff. Respect.

What is the proper way to use the last line of the terminal while playing back animation? Basically I want to display chafa stuff fullscreen - from top to bottom.
https://photos.app.goo.gl/w6Z55vwFN2DrWbd68
The brownish gap is the last line in the image.

I used tput smcup to check if it makes any difference. It does not in my case. The whole thing runs in a fullscreen alacritty like a greased lightning but I'm not able to properly solve this.
Well, I'm saying "not able" because one can always resize the terminal / the window itself - adding one more line / some more height pixels - and the last line gets offscreen. But I have a hunch that there is a less hacky solution.

Many thanks!
Andras

[Proposal] Preview mode with live paramater adjustment

It's a great success already! Chafa's preprocessor creates blotchy messes ouf of images with colors far from primary r.g.b though. One just needs to learn the tool.

Chafa vs Unicolexport

However I find myself going back and forth between GIMP and chafa many times, tweaking color gradients and hoping for the best.

This working loop might be made quicker if chafa had a preview mode wherein the user could, for e.g raise/lower r,g,b gamma with R/r, G/g, B/b. or gamma of all values with V/v. Likewise, preproocess could be toggled, or given a variable slider, contrast/brightness could be added, all adjustable in live preview window.

Once result is acceptable user would hit S to save or something.

Thanks, cheers

chafa complains about shared libraries

anything I try to do - even chafa --help - results in this message

chafa: error while loading shared libraries: libchafa.so.0: cannot open shared object file: No such file or directory

[Proposal] Optimal custom fonts using machine learning

The fonts used by us day to day are not specifically designed for printing images. In order to improve the result of character art, custom font is a doable solution, as proved by BE256 and BE512 fonts.

The highest resolution that chafa supports is 8x8 according to the bitmap. There are 2^64 possible combinations, but the whole Unicode table is not enough for that. However, my bold assumption is that most solutions in the space formed of 2^64 combinations are useless.

To find out the most useful N patterns in this space, we can take advantage from machine learning.

The proposed procedure for creating such custom font looks like this:

  1. sample M random crops (in ratio w=1:h=2) from an image dataset

  2. turn the M crops into binarized bitmaps using histogram and downsample to 8x8

  3. find N cluster centers in the space by leveraging Kmeans algorithm, with the M (64x1) binaryzed vectors as the dataset.

  4. convert the N vectors into C bitmap header and SVG plots.

Highlight:

  1. Best resolution.

  2. Easy to code. Automatic font and C code generation.

  3. I don't know what glyph is good for printing character art, but the algorithm can figure it out.

Assignee: myself

[fontgen] upgrade to python3 and make it easier to use

Debian has upgraded it's fontforge python version to 3.X . So in the next update we will be able to get rid of python2.

As discussed previously, this tool should be reworked to make it easier to use. Apart from the code cleanups and refactoring. I'm going to build a pipeline using the following dataset so users can build custom font with a single command.
https://www.kaggle.com/c/tiny-imagenet/data

Please assign this issue to me.
(I'm recently preparing for examinations and other things, still need some time to actually implement it)

compile error

I get the following error while make

chafa.c:970:13: error: too few arguments to function 'MagickResizeImage'                                    
             MagickResizeImage (wand, src_width, src_height, LanczosFilter);                                

I've installed the dependecies as:

apt-get install libmagickwand-dev
...
libmagickwand-dev is already the newest version (8:6.8.9.9-7ubuntu5.12).

which version of the dependencies are required?

SIGBUS while loading huge gifs

While attempting to view a 2gb gif file (youtube-dl > ffmpeg > gif) chafa crashed with following message:

fish: “chafa rickroll.gif” terminated by signal SIGBUS (Misaligned address error)

Firefox plays this gif without errors.

cannot compile example

Hi,
I have installed chafa as package Version: 1.2.1-1 (in Ubuntu).

pkg-config --cflags --libs chafa

returns

-I/usr/include/chafa -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lchafa -lm -lglib-2.0

Trying compile example from https://hpjansson.org/chafa/ref/chafa-using.html i got this error:

In file included from /usr/include/chafa/chafa.h:29,
from example.cpp:1:
/usr/include/chafa/chafa-version-macros.h:112:2: error: #error "CHAFA_VERSION_MIN_REQUIRED must be >= CHAFA_VERSION_1_0"
112 | #error "CHAFA_VERSION_MIN_REQUIRED must be >= CHAFA_VERSION_1_0"

If I delete the 112 line, I got this error:

cc example.c pkg-config --cflags --libs chafa -o hello

/usr/bin/ld: /tmp/ccSbs3zs.o: in function main': example.c:(.text+0xc5): undefined reference to chafa_canvas_set_contents_rgba8'
collect2: error: ld returned 1 exit status

Interactive mode

Chafa gave me a lot of fun already. Pretty amazing. I'm still hoping for more Sixel support on mainstream terminals, but the tricks employed by chafa are fun to show in a command line emailer like mutt :-)
Now I have a feature request... it would be cool to be able to press + for zooming, and then '-' of course to go back a zoomlevel. Also when zoomed in, it would be nice to move around with the arrow keys. In that way, one could zoom in to see details. E.g. you could suddenly read some text when zooming in.
But I don't know if it is hard to implement. It is mostly for fun anyway. It would be cool though ;-)

Python bindings

This library looks great. I was wondering if there is a python package available that wraps this? Would be great to have picture previews directly in the python terminal!

[1.4.0] wrong installation path of chafaconfig.h

bash autogen.sh; make; make install
~/Debian/chafa/chafa ❯❯❯❯ find /usr/local                                                                                                                       12:05:07
/usr/local
/usr/local/lib
/usr/local/lib/libchafa.so.0.3.0
/usr/local/lib/libchafa.so.0
/usr/local/lib/libchafa.so
/usr/local/lib/libchafa.la
/usr/local/lib/libchafa.a
/usr/local/lib/chafa
/usr/local/lib/chafa/include
/usr/local/lib/chafa/include/chafaconfig.h
/usr/local/lib/pkgconfig
/usr/local/lib/pkgconfig/chafa.pc
/usr/local/include
/usr/local/include/chafa
/usr/local/include/chafa/chafa.h
/usr/local/include/chafa/chafa-canvas.h
/usr/local/include/chafa/chafa-canvas-config.h
/usr/local/include/chafa/chafa-common.h
/usr/local/include/chafa/chafa-features.h
/usr/local/include/chafa/chafa-symbol-map.h
/usr/local/include/chafa/chafa-util.h
/usr/local/include/chafa/chafa-version-macros.h
/usr/local/share
/usr/local/share/man
/usr/local/share/man/man1
/usr/local/share/man/man1/chafa.1
/usr/local/bin
/usr/local/bin/chafa

chafaconfig.h has been required by a header file

include/chafa/chafa-version-macros.h
28:#include <chafaconfig.h>

So I think the automatically generated file has been installed to a wrong place, as the preprocessor won't seek into /usr/*/lib for a header file.

build error: aarch64, git master 2021-09-25

libtool: link: gcc -Wall -Wextra -Wmissing-prototypes -ffast-math -fvisibility=hidden -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/aarch64-linux-gnu//ImageMagick-6 -I/usr/include/ImageMagick-6 -I/usr/include/aarch64-linux-gnu//ImageMagick-6 -I/usr/include/ImageMagick-6 -I/usr/local/include/libpng17 -I/usr/include/freetype2 -O2 -ffast-math -ftree-vectorize -fno-strict-overflow -funsafe-math-optimizations -march=armv8-a+crypto+crc+aes+sha2 -Wl,-Bsymbolic -o .libs/chafa chafa-chafa.o chafa-file-mapping.o chafa-font-loader.o chafa-gif-loader.o chafa-named-colors.o chafa-xwd-loader.o  -lglib-2.0 /usr/lib/aarch64-linux-gnu/libMagickWand-6.Q16.so /usr/lib/aarch64-linux-gnu/libMagickCore-6.Q16.so -lfreetype ../../chafa/.libs/libchafa.so ../../libnsgif/.libs/libnsgif.a -pthread -fopenmp -Wl,-rpath -Wl,/usr/local/lib
/usr/bin/ld: chafa-chafa.o: in function `build_string':
chafa.c:(.text+0x7ac): undefined reference to `chafa_canvas_config_set_fg_only_enabled'
/usr/bin/ld: chafa.c:(.text+0x82c): undefined reference to `chafa_canvas_config_set_optimizations'
/usr/bin/ld: chafa.c:(.text+0x85c): undefined reference to `chafa_canvas_print'
/usr/bin/ld: chafa-chafa.o: in function `run':
chafa.c:(.text+0x11dc): undefined reference to `chafa_term_info_emit_cursor_to_top_left'
/usr/bin/ld: chafa.c:(.text+0x13e8): undefined reference to `chafa_term_info_emit_cursor_to_top_left'
/usr/bin/ld: chafa.c:(.text+0x1618): undefined reference to `chafa_term_info_emit_clear'
/usr/bin/ld: chafa.c:(.text+0x1624): undefined reference to `chafa_term_info_emit_cursor_to_top_left'
/usr/bin/ld: chafa.c:(.text+0x163c): undefined reference to `chafa_term_info_emit_cursor_up'
/usr/bin/ld: chafa.c:(.text+0x19f4): undefined reference to `chafa_term_info_emit_cursor_up'
/usr/bin/ld: chafa.c:(.text+0x1a04): undefined reference to `chafa_term_info_emit_clear'
/usr/bin/ld: chafa.c:(.text+0x1a14): undefined reference to `chafa_term_info_emit_cursor_to_top_left'
/usr/bin/ld: chafa-chafa.o: in function `parse_options':
chafa.c:(.text+0x21fc): undefined reference to `chafa_term_db_get_default'
/usr/bin/ld: chafa.c:(.text+0x2204): undefined reference to `chafa_term_db_detect'
/usr/bin/ld: chafa.c:(.text+0x2210): undefined reference to `chafa_term_info_have_seq'
/usr/bin/ld: chafa.c:(.text+0x2220): undefined reference to `chafa_term_info_have_seq'
/usr/bin/ld: chafa.c:(.text+0x2230): undefined reference to `chafa_term_info_have_seq'
/usr/bin/ld: chafa.c:(.text+0x2240): undefined reference to `chafa_term_info_have_seq'
/usr/bin/ld: chafa.c:(.text+0x2250): undefined reference to `chafa_term_info_have_seq'
/usr/bin/ld: chafa-chafa.o:chafa.c:(.text+0x2260): more undefined references to `chafa_term_info_have_seq' follow
/usr/bin/ld: chafa-chafa.o: in function `parse_options':
chafa.c:(.text+0x2290): undefined reference to `chafa_term_db_get_default'
/usr/bin/ld: chafa.c:(.text+0x2298): undefined reference to `chafa_term_db_get_fallback_info'
/usr/bin/ld: chafa.c:(.text+0x22a8): undefined reference to `chafa_term_info_supplement'
/usr/bin/ld: chafa.c:(.text+0x22b4): undefined reference to `chafa_term_info_unref'
/usr/bin/ld: chafa.c:(.text+0x262c): undefined reference to `chafa_term_info_have_seq'
/usr/bin/ld: chafa.c:(.text+0x2658): undefined reference to `chafa_term_info_have_seq'
/usr/bin/ld: chafa.c:(.text+0x2734): undefined reference to `chafa_term_info_have_seq'
/usr/bin/ld: chafa.c:(.text+0x2758): undefined reference to `chafa_term_info_have_seq'
/usr/bin/ld: chafa.c:(.text+0x2770): undefined reference to `chafa_term_info_have_seq'
/usr/bin/ld: chafa-chafa.o:chafa.c:(.text+0x27bc): more undefined references to `chafa_term_info_have_seq' follow
/usr/bin/ld: chafa-chafa.o: in function `main':
chafa.c:(.text.startup+0x1bc): undefined reference to `chafa_term_info_unref'
/usr/bin/ld: ../../chafa/.libs/libchafa.so: undefined reference to `chafa_work_cell_init'
/usr/bin/ld: ../../chafa/.libs/libchafa.so: undefined reference to `chafa_iterm2_canvas_draw_all_pixels'
/usr/bin/ld: ../../chafa/.libs/libchafa.so: undefined reference to `chafa_iterm2_canvas_new'
/usr/bin/ld: ../../chafa/.libs/libchafa.so: undefined reference to `chafa_kitty_canvas_draw_all_pixels'
/usr/bin/ld: ../../chafa/.libs/libchafa.so: undefined reference to `chafa_work_cell_get_mean_colors_for_symbol'
/usr/bin/ld: ../../chafa/.libs/libchafa.so: undefined reference to `chafa_term_info_emit_begin_sixels'
/usr/bin/ld: ../../chafa/.libs/libchafa.so: undefined reference to `chafa_prepare_pixel_data_for_symbols'
/usr/bin/ld: ../../chafa/.libs/libchafa.so: undefined reference to `chafa_term_info_ref'
/usr/bin/ld: ../../chafa/.libs/libchafa.so: undefined reference to `chafa_iterm2_canvas_destroy'
/usr/bin/ld: ../../chafa/.libs/libchafa.so: undefined reference to `chafa_work_cell_get_median_colors_for_symbol'
/usr/bin/ld: ../../chafa/.libs/libchafa.so: undefined reference to `chafa_iterm2_canvas_build_ansi'
/usr/bin/ld: ../../chafa/.libs/libchafa.so: undefined reference to `chafa_work_cell_to_bitmap'
/usr/bin/ld: ../../chafa/.libs/libchafa.so: undefined reference to `chafa_term_info_emit_end_sixels'
/usr/bin/ld: ../../chafa/.libs/libchafa.so: undefined reference to `chafa_term_info_get_seq'
/usr/bin/ld: ../../chafa/.libs/libchafa.so: undefined reference to `chafa_ascii_dec_u8'
/usr/bin/ld: ../../chafa/.libs/libchafa.so: undefined reference to `chafa_canvas_print_symbols'
/usr/bin/ld: ../../chafa/.libs/libchafa.so: undefined reference to `chafa_work_cell_calc_mean_color'
/usr/bin/ld: ../../chafa/.libs/libchafa.so: undefined reference to `chafa_kitty_canvas_destroy'
/usr/bin/ld: ../../chafa/.libs/libchafa.so: undefined reference to `chafa_kitty_canvas_build_ansi'
/usr/bin/ld: ../../chafa/.libs/libchafa.so: undefined reference to `chafa_work_cell_get_contrasting_color_pair'
/usr/bin/ld: ../../chafa/.libs/libchafa.so: undefined reference to `chafa_kitty_canvas_new'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:445: chafa] Error 1
make[3]: Leaving directory '/media/sd/pcbak2/Projects/ascii/chafa/tools/chafa'
make[2]: *** [Makefile:370: all-recursive] Error 1
make[2]: Leaving directory '/media/sd/pcbak2/Projects/ascii/chafa/tools'
make[1]: *** [Makefile:477: all-recursive] Error 1
make[1]: Leaving directory '/media/sd/pcbak2/Projects/ascii/chafa'
make: *** [Makefile:386: all] Error 2

anyone else getting this? i've run make clean...

-c none produces pointless \e[0m after every line

Even if -c none is specified, chafa outputs a color code (\e[0m) at the end of every line. That's not only pointless (there are no attributes to turn off), but also makes it impossible to pipe chafa's output. (Well, I know where to find ansi2txt or sed, but...)

[optimization] Parallelizing build_ansi_gstring using OpenMP

I still haven't finished reading the code so I'm not sure whether this is doable. The build_ansi_gstring function seems to be parallelizable with openmp. Theoretically if we split the process of comparing symbols with different part in the original image into many subtasks, those tasks are independent to each other and would likely to gain a further speed up from parallelization.

Ubuntu PPA?

Hi @cdluminate , hope you're well.

When I make new releases, people will usually ask for an Ubuntu PPA, so I'm considering setting one up. Is it okay if I base it off your existing packages? This would just be a stopgap for when Ubuntu is shipping older versions, obviously.

chafa8x8.py tuning/polishing

@cdluminate

This is probably not a showstopper, but may be worth looking into anyway:

When I run chafa8x8.py GenA, it prints the following:

$ ./chafa8x8.py GenA
 -> number of centers: 4414
=> Result saved to chafa8x8.json
Number of glyphs: 4414
I'm sorry this file is too complex for me to understand (or is erroneous)

The last one looks like an error message from fontforge. The resulting TTF seems ok from a quick look with ttfdump, though, so it's likely mostly cosmetic.

Syntax error running autogen.sh

When I run the autogen.sh it gives me this error:

checking for working 32bit popcnt intrinsics... yes
checking for -fvisibility=hidden compiler flag... yes
./configure: line 14316: syntax error near unexpected token `-ffast-math,'
./configure: line 14316: `AX_CHECK_COMPILE_FLAG(-ffast-math,'

I looked at the code of the file .configure and it looks like this near the 14316 line:

$as_echo "#define _CHAFA_EXTERN __attribute__((visibility(\"default\"))) extern" >>confdefs.h

      CHAFA_VISIBILITY_CFLAGS="-fvisibility=hidden"

fi
    ;;
esac

AX_CHECK_COMPILE_FLAG(-ffast-math,
    BASE_CFLAGS="$BASE_CFLAGS -ffast-math",
    ,
    -Werror)



SAVED_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CFLAGS $MAGICKWAND_CFLAGS"
for ac_header in wand/MagickWand.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "wand/MagickWand.h" "ac_cv_header_wand_MagickWand_h" "$ac_includes_default"
if test "x$ac_cv_header_wand_MagickWand_h" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_WAND_MAGICKWAND_H 1
_ACEOF

How can I patch this?

Could glib be avoided?

I'm concerned that glib might not be available on every platform. Could it be removed as a dependency? (I'm not a C dev, I'm just wondering)

Haiku port fails on 32bit

The reported error: chafa-popcnt.c:45:10: error: unknown type name '__int32_t'; did you mean 'u_int32_t'? can be fixed with the next solution, would this be ok to create a PR for?

--- a/chafa/internal/chafa-popcnt.c
+++ b/chafa/internal/chafa-popcnt.c
@@ -23,6 +23,10 @@
 #include "chafa.h"
 #include "internal/chafa-private.h"

+#if defined(__HAIKU__)
+    typedef int32_t __int32_t;
+#endif
+
 gint
 chafa_pop_count_u64_builtin (guint64 v)
 {

braille range dot matrix

The Braille range at U+2800..U+28FF provides a set of 2×4 dot matrix glyphs that can be very nicely abused for displaying an image. This doesn't mesh well with other glyphs used by chafa as these have a visible raster, but can be a mode on its own.

It has already been implemented in black&white by me as brailleimg and by ImageMagick guys as part of convert. As the latter is shipped in existing packages, I deleted my implementation (last copy), but the one in imagemagick is not only not even mentioned in documentation (convert image.png image.ubrl) but also cumbersome to use: there's a pointless header and the image is negated.

So I wonder if you'd want to bundle this with chafa — a black&white mode is trivial to add, while color, trickier, is doable — would have a ZX-Spectrumese feel.

[i386] port chafa to i386 architecture

chafa-popcnt.c uses intrinsic _mm_popcnt_u64 which is not supported by i386.
And the result is that chafa failed to build on i386 architecture:
https://buildd.debian.org/status/package.php?p=chafa

I have successfully ported chafa to i386, with the following patch.

diff --git a/chafa/chafa-popcnt.c b/chafa/chafa-popcnt.c
index 22b3eb4..0d95e39 100644
--- a/chafa/chafa-popcnt.c
+++ b/chafa/chafa-popcnt.c
@@ -26,7 +26,12 @@
 gint
 chafa_pop_count_u64_builtin (guint64 v)
 {
+#if !defined(CHAFA_REG_BIT32)
     return (gint) _mm_popcnt_u64 (v);
+#else
+    __int32_t* w = (__int32_t*)&v;
+    return (gint) _mm_popcnt_u32(w[0]) + _mm_popcnt_u32(w[1]);
+#endif
 }
 
 void
@@ -34,13 +39,20 @@ chafa_pop_count_vu64_builtin (const guint64 *vv, gint *vc, gint n)
 {
     while (n--)
     {
+#if !defined(CHAFA_REG_BIT32)
         *(vc++) = _mm_popcnt_u64 (*(vv++));
+#else
+	__int32_t* w = (__int32_t*)vv;
+        *(vc++) = _mm_popcnt_u32(w[0]) + _mm_popcnt_u32(w[1]);
+	vv++;
+#endif
     }
 }
 
 void
 chafa_hamming_distance_vu64_builtin (guint64 a, const guint64 *vb, gint *vc, gint n)
 {
+#if !defined(CHAFA_REG_BIT32)
     while (n >= 4)
     {
         n -= 4;
@@ -50,6 +62,15 @@ chafa_hamming_distance_vu64_builtin (guint64 a, const guint64 *vb, gint *vc, gin
         *(vc++) = _mm_popcnt_u64 (a ^ *(vb++));
     }
 
-    while (n--)
+    while (n--) {
         *(vc++) = _mm_popcnt_u64 (a ^ *(vb++));
+    }
+#else
+    __int32_t* aa = (__int32_t*)&a;
+    __int32_t* wb = (__int32_t*)vb;
+    while (n--) {
+        *(vc++) = _mm_popcnt_u32(aa[0]^wb[0]) + _mm_popcnt_u32(aa[1]^wb[1]);
+	wb += 2;
+    }
+#endif
 }

reference _mm_popcnt_u64
_mm_popcnt_u32

zhengxwen/HIBAG@d503222

sixel support

You mentioned sixel in TODO. However I didn't realize how sixel perform well in the terminal until I see this: https://github.com/hackerb9/lsix . It's a simple bash script, and it might provide some inspiration?

Taking EXIF orientation metadata into account when displaying photos

Photos can contain EXIF metadata. It can contain "Orientation" metadata, which records the orientation of the camera when the photo was taken. Most software such as browsers and image viewers take that orientation into account when displaying the image.

chafa does not seem to take the orientation metadata into account. It displays the image rotated in the wrong way, (that is, not rotated at all), compared to the user's expectations from how the photo is displayed in the file explorer, the browser, and other software.

You can find example images with "Orientation" metadata here: https://github.com/ianare/exif-samples/tree/master/jpg/orientation

make freetype dependency internal

Packages like harfbuzz are able to build freetype and link to it without having to have freetype installed first.

Any chance of doing that with chafa?

I'm a developer with Chromebrew, and I'm trying to reduce circular dependencies, and we're building harfbuzz against chafa... which depends upon freetype... and it would be nice not to have a special freetype install just to build chafa against.

Sixel: image previewed inside Vifm doesn't span across all available space

System information

OS: Alpine Linux (edge)
chafa version: 1.8.0 / current master
vifm version: 0.12 / current master
terminal emulator: foot / kitty

Vifm

Here are some flags for the previewer inside Vifm that I use:

  %N        Do not detach viewer from terminal session (leaves `/dev/tty`
            available).

                                                               *vifm-%pc*
  %pc       marks the end of the main command and the beginning of the
            clear command for graphical preview, which is invoked on
            closing preview of a file.

                                                               *vifm-%pd*
  %pd       marks a preview command as one that directly communicates
            with the terminal.  Beware that this is for things like sixel
            which are self-contained sequences that depend only on current
            cursor position, using this with anything else is likely to
            mangle terminal state.

  The following dimensions and coordinates are in characters:
                                                               *vifm-%px*
  %px       x coordinate of top-left corner of preview area.
                                                               *vifm-%py*
  %py       y coordinate of top-left corner of preview area.
                                                               *vifm-%pw*
  %pw       width of preview area.
                                                               *vifm-%ph*
  %ph       height of preview area.
                                                               *vifm-%c*
  %c  %"c   the current file under the cursor.

Supported modifiers are:
    :p           - full path

Description

I'm trying to use sixel to preview images inside vifm. The command I use in vifmrc file:

fileviewer *.png,*.jpg
        \ chafa -f sixel -s %pwx%ph %c:p %pd 2>/dev/null

The output is something like this:

2022-02-18-111905_grim

Here is the output for kitty (left) and symbols (right) backends, with the following commands (%N flag is not in 0.12 branch):

fileviewer *.png,*.jpg
        \ chafa -f kitty -s %pwx%ph %c:p %pd %N 2>/dev/null

fileviewer *.png,*.jpg
        \ chafa -f symbols -s %pwx%ph %c:p 2>/dev/null

2022-02-18-111645_grim

Side note

I echoed the dimensions (%pw and %ph) then used the numbers to output the image with sixel in the command line and it works fine (in the examples above it should be 48x37)

Smolscale uses too much stack space

System information:

OS: Alpine Linux (edge)
Terminal emulator: foot / alacritty
chafa version: 1.8.0

Description

Most image files get rendered with no problem, while some crashes with SIGSEGV (I tried on both terminal emulators with both sixel and symbols format)

Here is a sample strace I get:

$ strace chafa Pictures/Wallpapers/00.jpg

execve("/usr/bin/chafa", ["chafa", "Pictures/Wallpapers/00.jpg"], 0x7ffdd0ae31c8 /* 106 vars */) = 0
arch_prctl(ARCH_SET_FS, 0x7fbef474cb48) = 0
set_tid_address(0x7fbef474cf90)         = 7543
brk(NULL)                               = 0x556512eab000
brk(0x556512ead000)                     = 0x556512ead000
mmap(0x556512eab000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x556512eab000
open("/etc/ld-musl-x86_64.path", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libMagickWand-7.Q16HDRI.so.10", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libMagickWand-7.Q16HDRI.so.10", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libMagickWand-7.Q16HDRI.so.10", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=1156936, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 1163264, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef459a000
mmap(0x7fbef45ac000, 884736, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x12000) = 0x7fbef45ac000
mmap(0x7fbef4684000, 192512, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0xea000) = 0x7fbef4684000
mmap(0x7fbef46b3000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x118000) = 0x7fbef46b3000
close(3)                                = 0
open("/lib/libfreetype.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libfreetype.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libfreetype.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=751808, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \332\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 757760, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef44e1000
mmap(0x7fbef44ee000, 442368, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0xd000) = 0x7fbef44ee000
mmap(0x7fbef455a000, 225280, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x79000) = 0x7fbef455a000
mmap(0x7fbef4592000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xb0000) = 0x7fbef4592000
close(3)                                = 0
open("/lib/libchafa.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libchafa.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libchafa.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=256512, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\324\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 262144, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef44a1000
mmap(0x7fbef44ae000, 94208, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0xd000) = 0x7fbef44ae000
mmap(0x7fbef44c5000, 86016, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x24000) = 0x7fbef44c5000
mmap(0x7fbef44da000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x38000) = 0x7fbef44da000
close(3)                                = 0
open("/lib/libglib-2.0.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libglib-2.0.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libglib-2.0.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=1085128, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 1093632, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef4396000
mmap(0x7fbef43b2000, 417792, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x1c000) = 0x7fbef43b2000
mmap(0x7fbef4418000, 544768, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x82000) = 0x7fbef4418000
mmap(0x7fbef449e000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x107000) = 0x7fbef449e000
mmap(0x7fbef44a0000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fbef44a0000
close(3)                                = 0
open("/lib/libMagickCore-7.Q16HDRI.so.10", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libMagickCore-7.Q16HDRI.so.10", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libMagickCore-7.Q16HDRI.so.10", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=2181144, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 2310144, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef4162000
mmap(0x7fbef418a000, 1314816, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x28000) = 0x7fbef418a000
mmap(0x7fbef42cb000, 376832, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x169000) = 0x7fbef42cb000
mmap(0x7fbef4328000, 450560, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1c5000) = 0x7fbef4328000
mmap(0x7fbef4378000, 122880, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fbef4378000
close(3)                                = 0
open("/lib/libX11.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libX11.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libX11.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=1185936, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\330\1\0\0\0\0\0"..., 960) = 960
mmap(NULL, 1191936, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef403f000
mmap(0x7fbef405a000, 454656, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x1b000) = 0x7fbef405a000
mmap(0x7fbef40c9000, 598016, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x8a000) = 0x7fbef40c9000
mmap(0x7fbef415b000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x11b000) = 0x7fbef415b000
close(3)                                = 0
open("/lib/libbz2.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libbz2.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libbz2.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=58024, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\270\"\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 61440, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef4030000
mmap(0x7fbef4032000, 36864, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x7fbef4032000
mmap(0x7fbef403b000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0xb000) = 0x7fbef403b000
mmap(0x7fbef403d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xc000) = 0x7fbef403d000
close(3)                                = 0
open("/lib/libpng16.so.16", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libpng16.so.16", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libpng16.so.16", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=190256, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 i\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 196608, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef4000000
mmap(0x7fbef4006000, 118784, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x6000) = 0x7fbef4006000
mmap(0x7fbef4023000, 45056, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x23000) = 0x7fbef4023000
mmap(0x7fbef402e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2d000) = 0x7fbef402e000
close(3)                                = 0
open("/lib/libz.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=100144, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0003\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 106496, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3fe6000
mmap(0x7fbef3fe9000, 57344, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x3000) = 0x7fbef3fe9000
mmap(0x7fbef3ff7000, 28672, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x11000) = 0x7fbef3ff7000
mmap(0x7fbef3ffe000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x17000) = 0x7fbef3ffe000
close(3)                                = 0
open("/lib/libbrotlidec.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libbrotlidec.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libbrotlidec.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=42672, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\20\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 49152, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3fda000
mmap(0x7fbef3fdb000, 24576, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x1000) = 0x7fbef3fdb000
mmap(0x7fbef3fe1000, 12288, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x7000) = 0x7fbef3fe1000
mmap(0x7fbef3fe4000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x9000) = 0x7fbef3fe4000
close(3)                                = 0
open("/lib/libpcre.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libpcre.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libpcre.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=370464, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360!\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 376832, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3f7e000
mmap(0x7fbef3f80000, 245760, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x7fbef3f80000
mmap(0x7fbef3fbc000, 110592, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x3e000) = 0x7fbef3fbc000
mmap(0x7fbef3fd8000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x59000) = 0x7fbef3fd8000
close(3)                                = 0
open("/lib/libintl.so.8", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libintl.so.8", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libintl.so.8", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=42744, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320$\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 53248, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3f71000
mmap(0x7fbef3f73000, 24576, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x7fbef3f73000
mmap(0x7fbef3f79000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x8000) = 0x7fbef3f79000
mmap(0x7fbef3f7b000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x9000) = 0x7fbef3f7b000
mmap(0x7fbef3f7d000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fbef3f7d000
close(3)                                = 0
open("/lib/liblcms2.so.2", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/liblcms2.so.2", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/liblcms2.so.2", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=340656, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 352256, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3f1b000
mmap(0x7fbef3f26000, 192512, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0xb000) = 0x7fbef3f26000
mmap(0x7fbef3f55000, 81920, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x3a000) = 0x7fbef3f55000
mmap(0x7fbef3f6a000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x4e000) = 0x7fbef3f6a000
mmap(0x7fbef3f6f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fbef3f6f000
close(3)                                = 0
open("/lib/libxml2.so.2", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libxml2.so.2", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libxml2.so.2", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=1213568, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\374\2\0\0\0\0\0"..., 960) = 960
mmap(NULL, 1220608, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3df1000
mmap(0x7fbef3e20000, 708608, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x2f000) = 0x7fbef3e20000
mmap(0x7fbef3ecd000, 274432, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0xdc000) = 0x7fbef3ecd000
mmap(0x7fbef3f10000, 45056, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x11e000) = 0x7fbef3f10000
mmap(0x7fbef3f1a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fbef3f1a000
close(3)                                = 0
open("/lib/libfontconfig.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libfontconfig.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libfontconfig.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=239520, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300w\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 245760, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3db5000
mmap(0x7fbef3dbc000, 110592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x7000) = 0x7fbef3dbc000
mmap(0x7fbef3dd7000, 94208, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x22000) = 0x7fbef3dd7000
mmap(0x7fbef3dee000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x38000) = 0x7fbef3dee000
close(3)                                = 0
open("/lib/libXext.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libXext.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libXext.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=72544, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\310C\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 77824, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3da2000
mmap(0x7fbef3da6000, 36864, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x4000) = 0x7fbef3da6000
mmap(0x7fbef3daf000, 12288, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0xd000) = 0x7fbef3daf000
mmap(0x7fbef3db3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x10000) = 0x7fbef3db3000
close(3)                                = 0
open("/lib/libltdl.so.7", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libltdl.so.7", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libltdl.so.7", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=38664, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220$\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 45056, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3d97000
mmap(0x7fbef3d99000, 16384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x7fbef3d99000
mmap(0x7fbef3d9d000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x6000) = 0x7fbef3d9d000
mmap(0x7fbef3da0000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x8000) = 0x7fbef3da0000
close(3)                                = 0
open("/lib/libxcb.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libxcb.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libxcb.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=153312, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000\267\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 159744, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3d70000
mmap(0x7fbef3d7b000, 69632, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0xb000) = 0x7fbef3d7b000
mmap(0x7fbef3d8c000, 36864, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x1c000) = 0x7fbef3d8c000
mmap(0x7fbef3d95000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x24000) = 0x7fbef3d95000
close(3)                                = 0
open("/lib/libbrotlicommon.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libbrotlicommon.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libbrotlicommon.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=136952, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\20\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 143360, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3d4d000
mmap(0x7fbef3d4e000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x1000) = 0x7fbef3d4e000
mmap(0x7fbef3d4f000, 126976, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x7fbef3d4f000
mmap(0x7fbef3d6e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x20000) = 0x7fbef3d6e000
close(3)                                = 0
open("/lib/liblzma.so.5", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/liblzma.so.5", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/liblzma.so.5", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=136848, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\3504\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 143360, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3d2a000
mmap(0x7fbef3d2d000, 77824, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x3000) = 0x7fbef3d2d000
mmap(0x7fbef3d40000, 45056, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x16000) = 0x7fbef3d40000
mmap(0x7fbef3d4b000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x20000) = 0x7fbef3d4b000
close(3)                                = 0
open("/lib/libexpat.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libexpat.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libexpat.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=145144, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0pA\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 151552, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3d05000
mmap(0x7fbef3d09000, 90112, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x4000) = 0x7fbef3d09000
mmap(0x7fbef3d1f000, 28672, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x1a000) = 0x7fbef3d1f000
mmap(0x7fbef3d27000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x21000) = 0x7fbef3d27000
close(3)                                = 0
open("/lib/libuuid.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=30544, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 36864, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3cfc000
mmap(0x7fbef3cfe000, 16384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x7fbef3cfe000
mmap(0x7fbef3d02000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x6000) = 0x7fbef3d02000
mmap(0x7fbef3d03000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x6000) = 0x7fbef3d03000
close(3)                                = 0
open("/lib/libXau.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libXau.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libXau.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=13896, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\350\21\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 20480, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3cf7000
mmap(0x7fbef3cf8000, 4096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x1000) = 0x7fbef3cf8000
mmap(0x7fbef3cf9000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x7fbef3cf9000
mmap(0x7fbef3cfa000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x7fbef3cfa000
close(3)                                = 0
brk(0x556512eae000)                     = 0x556512eae000
open("/lib/libXdmcp.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libXdmcp.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libXdmcp.so.6", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=26336, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\270!\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 32768, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3cef000
mmap(0x7fbef3cf1000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x7fbef3cf1000
mmap(0x7fbef3cf3000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x4000) = 0x7fbef3cf3000
mmap(0x7fbef3cf5000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x5000) = 0x7fbef3cf5000
close(3)                                = 0
open("/lib/libbsd.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libbsd.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libbsd.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=72536, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340H\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 81920, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3cdb000
mmap(0x7fbef3cdf000, 36864, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x4000) = 0x7fbef3cdf000
mmap(0x7fbef3ce8000, 12288, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0xd000) = 0x7fbef3ce8000
mmap(0x7fbef3cec000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x10000) = 0x7fbef3cec000
mmap(0x7fbef3cee000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fbef3cee000
close(3)                                = 0
open("/lib/libmd.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libmd.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libmd.so.0", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=43040, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 $\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 49152, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3ccf000
mmap(0x7fbef3cd1000, 24576, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x7fbef3cd1000
mmap(0x7fbef3cd7000, 8192, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x8000) = 0x7fbef3cd7000
mmap(0x7fbef3cd9000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x9000) = 0x7fbef3cd9000
close(3)                                = 0
mprotect(0x7fbef46b3000, 8192, PROT_READ) = 0
mprotect(0x7fbef4592000, 28672, PROT_READ) = 0
mprotect(0x7fbef44da000, 24576, PROT_READ) = 0
mprotect(0x7fbef449e000, 4096, PROT_READ) = 0
mprotect(0x7fbef4749000, 4096, PROT_READ) = 0
mprotect(0x7fbef4328000, 86016, PROT_READ) = 0
mprotect(0x7fbef415b000, 12288, PROT_READ) = 0
mprotect(0x7fbef403d000, 4096, PROT_READ) = 0
mprotect(0x7fbef402e000, 4096, PROT_READ) = 0
mprotect(0x7fbef3ffe000, 4096, PROT_READ) = 0
mprotect(0x7fbef3fe4000, 4096, PROT_READ) = 0
mprotect(0x7fbef3fd8000, 4096, PROT_READ) = 0
mprotect(0x7fbef3f7b000, 4096, PROT_READ) = 0
mprotect(0x7fbef3f6a000, 8192, PROT_READ) = 0
mprotect(0x7fbef3f10000, 36864, PROT_READ) = 0
mprotect(0x7fbef3dee000, 8192, PROT_READ) = 0
mprotect(0x7fbef3db3000, 4096, PROT_READ) = 0
mprotect(0x7fbef3da0000, 4096, PROT_READ) = 0
mprotect(0x7fbef3d95000, 4096, PROT_READ) = 0
mprotect(0x7fbef3d6e000, 4096, PROT_READ) = 0
mprotect(0x7fbef3d4b000, 4096, PROT_READ) = 0
mprotect(0x7fbef3d27000, 8192, PROT_READ) = 0
mprotect(0x7fbef3d03000, 4096, PROT_READ) = 0
mprotect(0x7fbef3cfa000, 4096, PROT_READ) = 0
mprotect(0x7fbef3cf5000, 4096, PROT_READ) = 0
mprotect(0x7fbef3cec000, 4096, PROT_READ) = 0
mprotect(0x7fbef3cd9000, 4096, PROT_READ) = 0
mprotect(0x556511a11000, 16384, PROT_READ) = 0
clock_gettime(CLOCK_REALTIME, {tv_sec=1645090473, tv_nsec=614108351}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3ccd000
mmap(NULL, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3cc8000
rt_sigprocmask(SIG_UNBLOCK, [RT_1 RT_2], NULL, 8) = 0
rt_sigaction(SIGINT, {sa_handler=0x556511a06d05, sa_mask=[], sa_flags=SA_RESTORER|SA_RESETHAND|0xffffffff00000000, sa_restorer=0x7fbef46fcc8a}, NULL, 8) = 0
mmap(NULL, 45056, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3cbd000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3cbc000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3cbb000
mmap(NULL, 86016, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3ca6000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3ca5000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3ca4000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3ca3000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3ca2000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3ca1000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3ca0000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c9e000
futex(0x7fbef44a00e8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
ioctl(0, TIOCGWINSZ, {ws_row=42, ws_col=210, ws_xpixel=1890, ws_ypixel=1008}) = 0
ioctl(1, TIOCGWINSZ, {ws_row=42, ws_col=210, ws_xpixel=1890, ws_ypixel=1008}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c9c000
brk(0x556512eaf000)                     = 0x556512eaf000
futex(0x7fbef44a00e8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c9a000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c98000
munmap(0x7fbef3c98000, 8192)            = 0
ioctl(1, TIOCGWINSZ, {ws_row=42, ws_col=210, ws_xpixel=1890, ws_ypixel=1008}) = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, SNDCTL_TMR_START or TCSETS, {B38400 opost isig icanon -echo ...}) = 0
open("/usr/share/ImageMagick-7/policy.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/lib/ImageMagick-7.1.0//config-Q16HDRI/policy.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/etc/ImageMagick-7/policy.xml", O_RDONLY|O_LARGEFILE) = 3
lseek(3, 0, SEEK_END)                   = 3773
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c98000
mmap(NULL, 3773, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3c97000
munmap(0x7fbef3c97000, 3773)            = 0
close(3)                                = 0
open("/usr/share/doc/ImageMagick-7/policy.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/home/follie/.config/ImageMagick/policy.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/home/follie/.config/ImageMagick/policy.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c96000
munmap(0x7fbef3c96000, 8192)            = 0
munmap(0x7fbef3c98000, 8192)            = 0
open("/usr/share/ImageMagick-7/log.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/lib/ImageMagick-7.1.0//config-Q16HDRI/log.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/etc/ImageMagick-7/log.xml", O_RDONLY|O_LARGEFILE) = 3
lseek(3, 0, SEEK_END)                   = 1642
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c98000
mmap(NULL, 1642, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3c97000
munmap(0x7fbef3c97000, 1642)            = 0
close(3)                                = 0
open("/usr/share/doc/ImageMagick-7/log.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/home/follie/.config/ImageMagick/log.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/home/follie/.config/ImageMagick/log.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c96000
clock_gettime(CLOCK_MONOTONIC_RAW, {tv_sec=3687, tv_nsec=926796892}) = 0
times({tms_utime=0, tms_stime=1 /* 0.01 s */, tms_cutime=0, tms_cstime=0}) = 1431994417
munmap(0x7fbef3c96000, 8192)            = 0
munmap(0x7fbef3c98000, 8192)            = 0
clock_gettime(CLOCK_MONOTONIC_RAW, {tv_sec=3687, tv_nsec=927218663}) = 0
times({tms_utime=0, tms_stime=1 /* 0.01 s */, tms_cutime=0, tms_cstime=0}) = 1431994417
getcwd("/home/follie", 4096)            = 13
getpid()                                = 7543
readlink("/proc/7543/exe", "/usr/bin/chafa", 4096) = 14
stat("/usr/bin/chafa", {st_mode=S_IFREG|0755, st_size=88232, ...}) = 0
access("/usr/bin/chafa", F_OK)          = 0
sysinfo({uptime=3691, loads=[62976, 50496, 48544], totalram=15701123072, freeram=8627056640, sharedram=80433152, bufferram=1581056, totalswap=31402745856, freeswap=31402745856, procs=964, totalhigh=0, freehigh=0, mem_unit=1}) = 0
prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=1024, rlim_max=4*1024}) = 0
clock_gettime(CLOCK_REALTIME, {tv_sec=1645090473, tv_nsec=625634361}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=3690, tv_nsec=5702532}) = 0
open("Pictures/Wallpapers/00.jpg", O_RDONLY|O_LARGEFILE) = 3
lseek(3, 0, SEEK_SET)                   = 0
read(3, "\377\330\377\341\0\30", 6)     = 6
close(3)                                = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=3690, tv_nsec=6183952}) = 0
open("Pictures/Wallpapers/00.jpg", O_RDONLY|O_LARGEFILE) = 3
lseek(3, 0, SEEK_SET)                   = 0
read(3, "\377\330\377\341\0\30Exif\0\0II*\0\10\0\0\0\0\0\0\0\0\0\0\0\377\354\0\21"..., 100) = 100
close(3)                                = 0
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c96000
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c92000
open("/usr/share/ImageMagick-7/colors.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/lib/ImageMagick-7.1.0//config-Q16HDRI/colors.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/etc/ImageMagick-7/colors.xml", O_RDONLY|O_LARGEFILE) = 3
lseek(3, 0, SEEK_END)                   = 1383
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c90000
mmap(NULL, 1383, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3c8f000
munmap(0x7fbef3c8f000, 1383)            = 0
close(3)                                = 0
open("/usr/share/doc/ImageMagick-7/colors.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/home/follie/.config/ImageMagick/colors.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/home/follie/.config/ImageMagick/colors.xml", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c8e000
munmap(0x7fbef3c8e000, 8192)            = 0
munmap(0x7fbef3c90000, 8192)            = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c90000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c8e000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c8d000
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c89000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c88000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c87000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c86000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c85000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c84000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c83000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c82000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c81000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c80000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c7f000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c7e000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c7d000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c7c000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c7b000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c7a000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c79000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c78000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c77000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c76000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c75000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c74000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c73000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c72000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c71000
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c6d000
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c69000
stat("jpg", 0x7ffcf71e3bd0)             = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c67000
brk(0x556512eb0000)                     = 0x556512eb0000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c66000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c64000
readlink("/usr", 0x7ffcf71debef, 4042)  = -1 EINVAL (Invalid argument)
readlink("/usr/lib", 0x7ffcf71debef, 4046) = -1 EINVAL (Invalid argument)
readlink("/usr/lib/ImageMagick-7.1.0", 0x7ffcf71debef, 4064) = -1 EINVAL (Invalid argument)
readlink("/usr/lib/ImageMagick-7.1.0/modules-Q16HDRI", 0x7ffcf71debef, 4081) = -1 EINVAL (Invalid argument)
readlink("/usr/lib/ImageMagick-7.1.0/modules-Q16HDRI/coders", 0x7ffcf71debef, 4088) = -1 EINVAL (Invalid argument)
readlink("/usr/lib/ImageMagick-7.1.0/modules-Q16HDRI/coders/jpeg.la", 0x7ffcf71debef, 4096) = -1 EINVAL (Invalid argument)
stat("/usr/lib/ImageMagick-7.1.0/modules-Q16HDRI/coders/jpeg.la", {st_mode=S_IFREG|0755, st_size=1070, ...}) = 0
access("/usr/lib/ImageMagick-7.1.0/modules-Q16HDRI/coders/jpeg.la", F_OK) = 0
open("/usr/lib/ImageMagick-7.1.0/modules-Q16HDRI/coders/jpeg.la", O_RDONLY|O_LARGEFILE) = 3
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c63000
read(3, "# jpeg.la - a libtool library fi"..., 1024) = 1024
read(3, "lib/ImageMagick-7.1.0/modules-Q1"..., 1024) = 46
read(3, "", 1024)                       = 0
close(3)                                = 0
munmap(0x7fbef3c63000, 4096)            = 0
open("/usr/lib/ImageMagick-7.1.0/modules-Q16HDRI/coders/jpeg.so", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=51016, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 57344, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3c56000
mmap(0x7fbef3c59000, 24576, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x3000) = 0x7fbef3c59000
mmap(0x7fbef3c5f000, 12288, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x9000) = 0x7fbef3c5f000
mmap(0x7fbef3c62000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xb000) = 0x7fbef3c62000
close(3)                                = 0
open("/lib/libjpeg.so.8", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/libjpeg.so.8", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libjpeg.so.8", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
fstat(3, {st_mode=S_IFREG|0755, st_size=546640, ...}) = 0
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 E\0\0\0\0\0\0"..., 960) = 960
mmap(NULL, 552960, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3bcf000
mmap(0x7fbef3bd3000, 258048, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0x4000) = 0x7fbef3bd3000
mmap(0x7fbef3c12000, 270336, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0x43000) = 0x7fbef3c12000
mmap(0x7fbef3c54000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x84000) = 0x7fbef3c54000
close(3)                                = 0
mprotect(0x7fbef3c62000, 4096, PROT_READ) = 0
mprotect(0x7fbef3c54000, 4096, PROT_READ) = 0
clock_gettime(CLOCK_REALTIME, {tv_sec=1645090473, tv_nsec=639779233}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3bcd000
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3bc9000
clock_gettime(CLOCK_MONOTONIC_RAW, {tv_sec=3687, tv_nsec=942991478}) = 0
times({tms_utime=0, tms_stime=1 /* 0.01 s */, tms_cutime=0, tms_cstime=0}) = 1431994419
mmap(NULL, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3bc1000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3bc0000
clock_gettime(CLOCK_REALTIME, {tv_sec=1645090473, tv_nsec=640734670}) = 0
clock_gettime(CLOCK_REALTIME, {tv_sec=1645090473, tv_nsec=640839503}) = 0
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3bbc000
stat("Pictures/Wallpapers/00.jpg", {st_mode=S_IFREG|0644, st_size=3493745, ...}) = 0
open("Pictures/Wallpapers/00.jpg", O_RDONLY|O_LARGEFILE) = 3
readv(3, [{iov_base="\377\330", iov_len=2}, {iov_base="\377\341\0\30Exif\0\0II*\0\10\0\0\0\0\0\0\0\0\0\0\0\377\354\0\21Du"..., iov_len=1024}], 2) = 1026
lseek(3, -1026, SEEK_CUR)               = 0
mmap(NULL, 3493745, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3867000
close(3)                                = 0
munmap(0x7fbef3867000, 3493745)         = 0
madvise(0x7fbef3bc2000, 4096, MADV_FREE) = 0
munmap(0x7fbef3bc1000, 32768)           = 0
munmap(0x7fbef3bc0000, 4096)            = 0
munmap(0x7fbef3bbc000, 16384)           = 0
munmap(0x7fbef3bc9000, 16384)           = 0
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3bc9000
clock_gettime(CLOCK_MONOTONIC_RAW, {tv_sec=3687, tv_nsec=945256780}) = 0
times({tms_utime=0, tms_stime=1 /* 0.01 s */, tms_cutime=0, tms_cstime=0}) = 1431994419
mmap(NULL, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3bc1000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3bc0000
clock_gettime(CLOCK_REALTIME, {tv_sec=1645090473, tv_nsec=642980367}) = 0
clock_gettime(CLOCK_REALTIME, {tv_sec=1645090473, tv_nsec=643096793}) = 0
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3bbc000
stat("Pictures/Wallpapers/00.jpg", {st_mode=S_IFREG|0644, st_size=3493745, ...}) = 0
open("Pictures/Wallpapers/00.jpg", O_RDONLY|O_LARGEFILE) = 3
readv(3, [{iov_base="\377\330", iov_len=2}, {iov_base="\377\341\0\30Exif\0\0II*\0\10\0\0\0\0\0\0\0\0\0\0\0\377\354\0\21Du"..., iov_len=1024}], 2) = 1026
lseek(3, -1026, SEEK_CUR)               = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=3493745, ...}) = 0
lseek(3, 0, SEEK_CUR)                   = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=3493745, ...}) = 0
close(3)                                = 0
madvise(0x7fbef3bc2000, 4096, MADV_FREE) = 0
munmap(0x7fbef3bc1000, 32768)           = 0
munmap(0x7fbef3bc0000, 4096)            = 0
munmap(0x7fbef3bbc000, 16384)           = 0
munmap(0x7fbef3bc9000, 16384)           = 0
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3bc9000
clock_gettime(CLOCK_MONOTONIC_RAW, {tv_sec=3687, tv_nsec=947618253}) = 0
times({tms_utime=0, tms_stime=1 /* 0.01 s */, tms_cutime=0, tms_cstime=0}) = 1431994419
mmap(NULL, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3bc1000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3bc0000
clock_gettime(CLOCK_REALTIME, {tv_sec=1645090473, tv_nsec=645378389}) = 0
clock_gettime(CLOCK_REALTIME, {tv_sec=1645090473, tv_nsec=645484688}) = 0
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3bbc000
stat("Pictures/Wallpapers/00.jpg", {st_mode=S_IFREG|0644, st_size=3493745, ...}) = 0
open("Pictures/Wallpapers/00.jpg", O_RDONLY|O_LARGEFILE) = 3
readv(3, [{iov_base="\377\330", iov_len=2}, {iov_base="\377\341\0\30Exif\0\0II*\0\10\0\0\0\0\0\0\0\0\0\0\0\377\354\0\21Du"..., iov_len=1024}], 2) = 1026
lseek(3, -1026, SEEK_CUR)               = 0
mmap(NULL, 3493745, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbef3867000
close(3)                                = 0
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3863000
mmap(NULL, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef385d000
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3859000
clock_gettime(CLOCK_REALTIME, {tv_sec=1645090473, tv_nsec=646939844}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3858000
mmap(NULL, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3851000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3850000
munmap(0x7fbef3850000, 4096)            = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3850000
munmap(0x7fbef3850000, 4096)            = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3850000
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef384c000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef384a000
madvise(0x7fbef3852000, 4096, MADV_FREE) = 0
munmap(0x7fbef3851000, 28672)           = 0
munmap(0x7fbef3858000, 4096)            = 0
munmap(0x7fbef384c000, 16384)           = 0
munmap(0x7fbef384a000, 8192)            = 0
munmap(0x7fbef3850000, 4096)            = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3858000
clock_gettime(CLOCK_REALTIME, {tv_sec=1645090473, tv_nsec=649286183}) = 0
mmap(NULL, 99532868, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbeed96b000
mmap(NULL, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbeed963000
mmap(NULL, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbeed95b000
mmap(NULL, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbeed953000
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbeed950000
munmap(0x7fbeed953000, 32768)           = 0
munmap(0x7fbeed95b000, 32768)           = 0
munmap(0x7fbeed963000, 32768)           = 0
munmap(0x7fbef3863000, 16384)           = 0
munmap(0x7fbef385d000, 24576)           = 0
munmap(0x7fbeed950000, 12288)           = 0
munmap(0x7fbef3867000, 3493745)         = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3bbb000
mmap(NULL, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3bb4000
munmap(0x7fbef3bbb000, 4096)            = 0
madvise(0x7fbef3bb7000, 4096, MADV_FREE) = 0
madvise(0x7fbef3bb5000, 4096, MADV_FREE) = 0
madvise(0x7fbef3bb9000, 4096, MADV_FREE) = 0
munmap(0x7fbef3bb4000, 28672)           = 0
munmap(0x7fbef3c69000, 16384)           = 0
munmap(0x7fbef3c6d000, 16384)           = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=3690, tv_nsec=369650870}) = 0
mmap(NULL, 33177620, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbeeb9c6000
mmap(NULL, 98304, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3ba4000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c6f000
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3c6b000
mmap(NULL, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef3ba0000
mmap(NULL, 1718084, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef39fc000
mmap(NULL, 6872276, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbeeb338000
mmap(NULL, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef39f6000
sched_getaffinity(0, 128, [0, 1, 2, 3, 4, 5, 6, 7]) = 32
sched_getaffinity(0, 128, [0, 1, 2, 3, 4, 5, 6, 7]) = 32
gettid()                                = 7543
sched_getattr(7543, {size=56, sched_policy=SCHED_OTHER, sched_flags=0, sched_nice=0, sched_priority=0, sched_runtime=0, sched_deadline=0, sched_period=0, sched_util_min=0, sched_util_max=0}, 56, 0) = 0
sched_setattr(7543, {size=56, sched_policy=SCHED_OTHER, sched_flags=0, sched_nice=0, sched_priority=0, sched_runtime=0, sched_deadline=0, sched_period=0, sched_util_min=0, sched_util_max=0}, 0) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1 RT_2], NULL, 8) = 0
membarrier(MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED, 0) = 0
mmap(NULL, 143360, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef39d3000
mprotect(0x7fbef39d5000, 135168, PROT_READ|PROT_WRITE) = 0
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1 RT_2], [], 8) = 0
clone(child_stack=0x7fbef39f5af8, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|0x400000, parent_tid=[7544], tls=0x7fbef39f5b38, child_tidptr=0x7fbef474cf90) = 7544
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
futex(0x7fbef3ba0950, FUTEX_WAKE_PRIVATE, 1) = 1
mmap(NULL, 143360, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef39b0000
mprotect(0x7fbef39b2000, 135168, PROT_READ|PROT_WRITE) = 0
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1 RT_2], [], 8) = 0
clone(child_stack=0x7fbef39d2af8, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|0x400000, parent_tid=[7545], tls=0x7fbef39d2b38, child_tidptr=0x7fbef474cf90) = 7545
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
futex(0x7fbef3ba0950, FUTEX_WAKE_PRIVATE, 1) = 1
mmap(NULL, 143360, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbef398d000
+++ killed by SIGSEGV (core dumped) +++
fish: Job 1, 'strace chafa Pictures/Wallpaper…' terminated by signal SIGSEGV (Address boundary error)

improve compatibility with older ncurses

the goal is to use chafa as an image viewer inside vifm while preview mode is active (the other panel is still visible). as per comment by vifm's author it looks like there's a compatibility issue with limitation of color pair coming with ncurses. to cite:

If the image looks better in the same terminal outside vifm, then this is probably a
result of limited number of color pairs. curses library (except for some recent versions,
which do it in backwards incompatible way, I think) limits how many foreground-background
pairs it can handle for historical reasons. And vifm can't work around it except for supporting
newer curses API, which might lift this limitation on systems where it's available. Currently
that API isn't supported.

t4jlwzb
The whole discussion is at https://q2a.vifm.info/407/configure-chafa-image-viewer-images-within-vifm-image-defects. I wonder if it's possible for add something like a "legacy ncurses" mode which would make the images render better in such configuration.

Chafa crashes trying to allocate too much memory

When using any format other than symbols, chafa tries to allocate way too much memory. This happens with all images I tried so far, both PNG and JPEG. The issue was introduced somewhere between commits b4e513c (good) and 30b21fa (bad).

$ chafa -f kitty ~/Pictures/prince_of_persia_title_screen_scaled.png
(chafa:346124): GLib-ERROR **: 23:10:25.717: ../../../glib/gmem.c:108: failed to allocate 18446744066840471296 bytes
fish: “chafa -f kitty ~/Pictures/princ…” terminated by signal SIGTRAP (Trace or breakpoint trap)

$ chafa -f sixel ~/Pictures/prince_of_persia_title_screen_scaled.png
(chafa:346076): GLib-ERROR **: 23:10:07.137: ../../../glib/gmem.c:108: failed to allocate 18446744072010973248 bytes
fish: “chafa -f sixel ~/Pictures/princ…” terminated by signal SIGTRAP (Trace or breakpoint trap)

$ chafa -f iterm ~/Pictures/prince_of_persia_title_screen_scaled.png
(chafa:345798): GLib-ERROR **: 23:05:34.798: ../../../glib/gmem.c:108: failed to allocate 18446744066916285920 bytes
fish: “chafa -f iterm ~/Pictures/princ…” terminated by signal SIGTRAP (Trace or breakpoint trap)

Here is the backtrace from gdb:

#0  0x00007ffff7e9f295 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007ffff7ea0319 in g_log_default_handler () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007ffff7ea055c in g_logv () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007ffff7ea0743 in g_log () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007ffff7e9eec2 in g_malloc () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007ffff7c2cfcf in chafa_kitty_canvas_new (width=65008, height=39312) at chafa-kitty-canvas.c:53
#6  0x00007ffff7c1e37c in chafa_canvas_draw_all_pixels (canvas=0x5555555ff950, src_pixel_type=CHAFA_PIXEL_RGBA8_UNASSOCIATED, 
    src_pixels=0x7ffff3a66010 "\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377"..., src_width=1280, src_height=800, src_rowstride=5120) at chafa-canvas.c:1426
#7  0x000055555555eca1 in build_string (pixel_type=CHAFA_PIXEL_RGBA8_UNASSOCIATED, 
    pixels=0x7ffff3a66010 "\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377\340\300p\377"..., 
    src_width=1280, src_height=800, src_rowstride=5120, dest_width=136, dest_height=24) at chafa.c:1196
#8  0x000055555555f5f0 in run_magickwand (filename=0x5555555bd610 "/home/srl/Pictures/prince_of_persia_title_screen_scaled.png", 
    is_first_file=1, is_first_frame=1, quiet=0) at chafa.c:1508
#9  0x000055555556013d in run (filename=0x5555555bd610 "/home/srl/Pictures/prince_of_persia_title_screen_scaled.png", is_first_file=1, 
    is_first_frame=1, quiet=0) at chafa.c:1765
#10 0x00005555555602cd in run_all (filenames=0x5555555bf600 = {...}) at chafa.c:1826
#11 0x0000555555560456 in main (argc=2, argv=0x7fffffffe178) at chafa.c:1867

The file used in the above examples.
prince_of_persia_title_screen_scaled.png

[1.4.0] fails to build on hurd-i386

/bin/bash ../../libtool  --tag=CC   --mode=link gcc -Wall -Wextra -Wmissing-prototypes -ffast-math -fvisibility=hidden -I/usr/include/glib-2.0 -I/usr/lib/i386-gnu/glib-2.0/include -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/i386-gnu//ImageMagick-6 -I/usr/include/ImageMagick-6 -I/usr/include/i386-gnu//ImageMagick-6 -I/usr/include/ImageMagick-6 -I/usr/include/freetype2 -I/usr/include/libpng16 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security  -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o chafa chafa-chafa.o chafa-file-mapping.o chafa-font-loader.o chafa-gif-loader.o chafa-named-colors.o chafa-xwd-loader.o -lglib-2.0 -lMagickWand-6.Q16 -lMagickCore-6.Q16 -lfreetype ../../chafa/libchafa.la ../../libnsgif/libnsgif.la 
libtool: link: gcc -Wall -Wextra -Wmissing-prototypes -ffast-math -fvisibility=hidden -I/usr/include/glib-2.0 -I/usr/lib/i386-gnu/glib-2.0/include -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/i386-gnu//ImageMagick-6 -I/usr/include/ImageMagick-6 -I/usr/include/i386-gnu//ImageMagick-6 -I/usr/include/ImageMagick-6 -I/usr/include/freetype2 -I/usr/include/libpng16 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--as-needed -o .libs/chafa chafa-chafa.o chafa-file-mapping.o chafa-font-loader.o chafa-gif-loader.o chafa-named-colors.o chafa-xwd-loader.o  -lglib-2.0 /usr/lib/i386-gnu/libMagickWand-6.Q16.so /usr/lib/i386-gnu/libMagickCore-6.Q16.so -lfreetype ../../chafa/.libs/libchafa.so ../../libnsgif/.libs/libnsgif.a -pthread -fopenmp
/usr/bin/ld: ../../chafa/.libs/libchafa.so: undefined reference to `_mm_cvtm64_si64'
collect2: error: ld returned 1 exit status
Makefile:451: recipe for target 'chafa' failed

https://buildd.debian.org/status/fetch.php?pkg=chafa&arch=hurd-i386&ver=1.4.0-1&stamp=1586408244&raw=0
https://buildd.debian.org/status/package.php?p=chafa

Is there a backstory on the name

I could not find an answer, I find it curious and funny, in my native dialect of Spanish, "chafa" means "lame" or "crappy". It made me chuckle when I saw it, but I like it! specially since it seems like it is a useful utility to have.

Severe warping, broken -O 2..9

I attempted to use chafa on this image, but instead I got this:
image.

Excerpt from a line produced by chafa thisImage.png > output.ans:

^[[38;2;110;112;128;48;2;110;112;128m ^[[12b^[[38;2;99;101;115;48;2;74;75;83m

My best guess for what's happening in the optimization is you're trying to use the CSI sequence C (which wouldn't work for other reasons), but instead chafa uses b, which according to man console_codes, does not exist.

Chafa version 1.5.0 was used in all of these outputs.

P.S. After replacing all occurences of b with C:
image

Windows build with embedded GLib

What is the state of the project on windows? I tried building something based on example.c but i'm getting a SIGSEGV when calling chafa_symbol_map_new. In gdb all it tells me is:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffeca733416 in ntdll!RtlWaitOnAddress () from C:\WINDOWS\SYSTEM32\ntdll.dll

apt support for ubuntu bionic?

Hello, thank you for making and sharing your project with everybody.

I am running Ubuntu 18.04 (for hardware reasons). Attempting to add your repo for installing but not able.

  • run in terminal sudo add-apt-repository ppa:hpjansson/chafa and the output of that included Hit:20 http://ppa.launchpad.net/hpjansson/chafa/ubuntu bionic InRelease

  • sudo apt update and sudo apt install chafa but this reaults in E: Unable to locate package chafa

I looked in synaptic, updated again, and I can see the repo but not locate the package.

But when I investigate to Packages in “Chafa” on launchpad, I see

This PPA currently publishes packages for Impish, Hirsute, Groovy, Focal, Eoan, and Disco.

So I am thinking my version (bionic) is not available.

If this is the case then it should be indicated on the download page.

If I am thinking wrong, and the problem is with me, then I am in the wrong place. :) So let me know and I'll seek support on how to use linux somewhere else.

chafa.c:547: pointless assignment ?

chafa.c:547:13: warning: explicitly assigning value of variable of type 'guint32' (aka 'unsigned int') to itself [-Wself-assign]

Source code is

else
{
col = col;
}

Fails to compile on FreeBSD

Making all in smolscale
/bin/sh ../../../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I../../.. -Wall -Wextra -Wmissing-prototypes -fvisibility=hidden -DSMOL_WITH_AVX2 -g -O2 -MT libsmolscale_la-smolscale.lo -MD -MP -MF .deps/libsmolscale_la-smolscale.Tpo -c -o libsmolscale_la-smolscale.lo test -f 'smolscale.c' || echo './'smolscale.c
libtool: compile: cc -DHAVE_CONFIG_H -I. -I../../.. -Wall -Wextra -Wmissing-prototypes -fvisibility=hidden -DSMOL_WITH_AVX2 -g -O2 -MT libsmolscale_la-smolscale.lo -MD -MP -MF .deps/libsmolscale_la-smolscale.Tpo -c smolscale.c -fPIC -DPIC -o .libs/libsmolscale_la-smolscale.o
smolscale.c:8:10: fatal error: 'alloca.h' file not found
#include <alloca.h> /* alloca */
^~~~~~~~~~
1 error generated.
*** Error code 1

Stop.
make[4]: stopped in /usr/home/gregf/chafa/chafa/internal/smolscale
*** Error code 1

Stop.
make[3]: stopped in /usr/home/gregf/chafa/chafa/internal
*** Error code 1

Stop.
make[2]: stopped in /usr/home/gregf/chafa/chafa
*** Error code 1

Stop.
make[1]: stopped in /usr/home/gregf/chafa
*** Error code 1

Stop.
make: stopped in /usr/home/gregf/chafa

Now Konsole supports graphics

Good news: Konsole (git) supports sixel, iTerm2 and kitty protocols! 🎉
Works for me ™️ :

diff --git a/chafa/chafa-term-db.c b/chafa/chafa-term-db.c
index b5cacee..472215e 100644
--- a/chafa/chafa-term-db.c
+++ b/chafa/chafa-term-db.c
@@ -321,6 +321,11 @@ detect_capabilities (ChafaTermInfo *ti, gchar **envp)
         gfx_seqs = sixel_seqs;
     }

+    if (strcasecmp (term_program, "konsole"))
+    {
+        gfx_seqs = sixel_seqs;
+    }
+
     /* Apple Terminal sets TERM=xterm-256color, and does not support truecolor */
     if (!g_ascii_strcasecmp (term_program, "Apple_Terminal"))
         color_seq_list = color_256_list;

ImageMagick 7 support

After some simple tests, chafa seems to work fine with ImageMagick 7 by just replacing wand/MagickWand.h with MagickWand/MagickWand.h.

I'm not an expert on autotools, so I'm opening this as an issue - maybe a new define for the new include path?

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.