nate-xyz/paleta

Support WebP, AVIF, & JXL Image Formats

gianni-rosato opened this issue · 1 comments

WebP is already immensely popular on the web while AVIF is gaining traction quickly & is already well-supported by every major web browser. JXL (JPEG-XL) is designed to be the successor to JPEG, has been endorsed by companies like Facebook, Adobe, Shopify, & Cloudinary, and is already gaining popularity in professional workflows. All three formats are open source. You can look into them more here: AVIF | WebP | JXL

Thanks so much for the wonderful application, I enjoy your work!

tfuxu commented

GdkPixbuf (library for loading images in GTK) doesn't contain required loaders for AVIF, WebP and JXL formats, but they can be added by including format parsing libraries that contain custom GdkPixbuf loaders.

For AVIF, the library has been recently added to GNOME runtime, it can be tested with master version of runtime, but it won't be available in Paleta builds until GNOME 44 release.

Support for WebP can be added by including webp-pixbuf-loader in Flatpak manifest, like how it's done here.

JPEG-XL isn't integrated into GNOME runtime, but its library, libjxl contains a Pixbuf loader and it possibly could be also included in Paleta's Flatpak manifest.

HEIC/HEIF format support should be also something to consider, as it is a default image codec for all images taken on iOS devices for some time now. libheif also have a custom loader, so if libjxl will be possible to add in some way, libheif should be also added with it.

Alternatively, Paleta could use image-rs library, which supports WebP and AVIF but lacks JPEG-XL support. There is a tracking issue for it here, but it has been silent for several months, so as a complementary library we could use jpegxl-rs. HEIC/HEIF support could be then added by using libheif's bindings to Rust: https://crates.io/crates/libheif-sys