linuxmint / xviewer

A generic Image viewer
GNU General Public License v2.0
70 stars 37 forks source link

JPEG XL support #162

Open veikk0 opened 2 years ago

veikk0 commented 2 years ago

Based on JPEG XL's compression efficiency, encoding and decoding performance, and backwards compatibility features (like lossless JPEG transcoding), it seems we're finally going to have a universal image format. The file format was standardised in October 2021, and further ISO standarisation effort is ongoing; see https://en.wikipedia.org/wiki/JPEG_XL#Standardization_status.

JPEG XL support would be a great addition to xviewer. I'm looking to use JPEG XL, but even viewer support is currently rare. The only easy-to-install viewer I was able to find for Linux Mint was the gThumb Flatpak, but it's slow to start and doesn't support animated JXLs.

The reference implementation of JPEG XL is libjxl: https://github.com/libjxl/libjxl

darkshram commented 2 years ago

Borrowing my own comment from several issues in pix... Just install jxl-pixbuf-loader and you will get jxl support in pix and xviewer. Packages are available in Debian, Ubuntu, Linux Mint, Fedora, etc.

Same goes for webp, heif and avif formats. Just install webp-pixbuf-loader, heif-pixbuf-loader and avif-pixbuf-loader packages from your distribution software repositories.

mars4science commented 2 years ago

@darkshram , hi! I"m on Linux Mint 20.2. apt-get update; apt-get install jxl-pixbuf-loader says "E: Unable to locate package jxl-pixbuf-loader". How to install them? TIA

darkshram commented 2 years ago

https://github.com/libjxl/libjxl/releases

There you will find packages for Debian/Ubuntu. Mint is based on Ubuntu, so you may prefer the Ubuntu ones.

You may also try to build and install libxjl from source.

mars4science commented 2 years ago

@darkshram , thanks. I still wonder why they are not available in the repos. Can users realistically facilitate the process of inclusion? Maybe even included in LM distro ISO from the start? TIA

darkshram commented 2 years ago

A few days ago I opened an issue at the pix repository asking to add the pixbuf-loaders as soft or hard dependencies for pix. This means installing pix would require to install or at least recommend to install the pixbuf-loaders required to view webp, jpeg200, jxl, raw, heif, etc.

https://github.com/linuxmint/pix/issues/152

puroh commented 1 year ago

hi, i find this repository, in my case work in linux mint 20.3

sudo add-apt-repository ppa:krifa75/eog-ordissimo

Then, update your system's package list using APT.

sudo apt update

Next, install the library by running:

sudo apt install webp-pixbuf-loader

clefebvre commented 1 year ago

Alright. This might happen in Mint 21.2.. the latest libjxl was just out yesterday, Ubuntu lunar is at 0.7 right now, though I don't yet see a gdkpixbuf loader in their library.

On our side we're going to wait a little bit until the dust settles and Ubuntu/Debian get a chance to package this the way they want. Then we'll need to do the following:

I don't want to do this right now because I can't really predict how this will be packaged in Debian/Ubuntu. I don't want to do things differently and introduce differences between the distros.

mtwebster commented 4 months ago

Update - according to this bug report, it doesn't look like we'll get the pixbuf loader for a while yet (this is what xviewer, other programs need to load these files), unless we package it ourselves.

There's a djxl utility, part of libjxl-tools (which will be available in Mint 22), which would allow us to create a thumbnailer, but it would probably be quite slow compared to if we had the pixbuf loader - we'd have to extract an image with this tool, then resize it afterward.

edit: Pix (our photo editor) will have jxl support in the next release.