diff options
author | NRK <nrk@disroot.org> | 2024-06-27 14:38:49 +0200 |
---|---|---|
committer | NRK <nrk@disroot.org> | 2024-06-27 14:38:49 +0200 |
commit | 99e941271d741a198b592186745a9f735896f286 (patch) | |
tree | 3a30ae00c2bd72cb92b59f8b0d3b9cc5ef719a1e | |
parent | b3eab414dd6aa97e09ccc041f955a35bb1a9112b (diff) | |
download | nsxiv-99e941271d741a198b592186745a9f735896f286.tar.zst |
use compression level 8 when writing png thumbnails (#505)
by default imlib2 uses a compression level of 2 for writing
pngs, which is rather low.
a compression level of 8 should result in slightly lower
thumbnail filesizes without affecting the encoding speed too
much (since these thumbnails are very small already).
Reviewed-on: https://codeberg.org/nsxiv/nsxiv/pulls/505
Reviewed-by: eylles <eylles@noreply.codeberg.org>
-rw-r--r-- | thumbs.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -121,6 +121,7 @@ static void tns_cache_write(tns_t *tns, Imlib_Image im, const char *filepath, bo imlib_context_set_image(im); if (imlib_image_has_alpha()) { imlib_image_set_format("png"); + imlib_image_attach_data_value("compression", NULL, 8, NULL); } else { imlib_image_set_format("jpg"); imlib_image_attach_data_value("quality", NULL, 90, NULL); |