image-rs / image

Encoding and decoding images in Rust
Apache License 2.0
4.91k stars 607 forks source link

KTX2 support #1664

Open gents83 opened 2 years ago

gents83 commented 2 years ago

I would like to be able to load Khronos KTX texture format

There Is a ktx crate, but it would be awesome to have it integrated inside image-rs directly

gents83 commented 9 months ago

Is anyone working on this or could it be worth for me to work on a PR @HeroicKatora ?

fintelia commented 8 months ago

I don't think anyone is currently working on this.

One complication with adding KTX support is that folks using KTX files generally want the compressed data within the container left intact. By contrast, this library is designed around the assumption that decoding an image means decompressing it and doing color conversions to get the data into raw 8-bit depth RGB pixels or one of a small number of other formats.

Thus the first step would be figuring out exact what use case KTX decoding would serve, and then designing the functionality around that.

MattGuerrette commented 4 months ago

One use case for this would be to support at least previewing of KTX2 compressed image files. Projects like https://gitlab.gnome.org/sophie-h/glycin/ currently use image-rs and adding support for KTX2 would allow for viewing these files in GNOME's image viewer app: https://gitlab.gnome.org/GNOME/loupe