SFML/SFML

Add support for QOI (Quite OK Image) and QOA (Quite OK Audio) formats

vittorioromeo opened this issue · 2 comments

Prerequisite Checklist

Describe your feature request here

These are two formats designed by Dominic Szablewski that gained quite a lot of approval and praise in the gamedev community.

They have a focus on simplicity (easy to implement and understand), but -- despite that -- have quite good results in terms of quality, compression speed, and decompression speed.

The Godot Engine recently added support for them.

I think it would be a nice addition to SFML as the format C implementations are very lightweight to add, and it shouldn't be hard at all to integrate them with our existing SFML interfaces.

Use Cases

  • Enable use of QOI assets
  • Enable use of QOA assets

API Example

No response

Noticed this issue hasn't had much love or attention in those couple of days so thought I'd leave my view to help the discussion get going. Based on the research and reading I've done on the QOI & QOA formats, I'm interested in playing with them external to SFML and seeing if they offer me a benefit to load times (which audio assets currently suffer the worst load times on my current project).

I think the fact the QOI format is available in tools such as GameMaker ties back to your mention of the traction it's gaining within game development. I hadn't seen much on this format prior to this issue so thank you @vittorioromeo for that.

I think users making games with lots textures, or a few large textures, and lots of sound effects would be interested in seeing if there is benefit in QOI/QOA formats in our SFML applications.

I don't mind having those formats supported, as long as it doesn't require the use of a library.

I believe it's easier for the audio part, since we have separate file readers/writers, where as the image part currently fully relies on stb_image

As I understood it, QOI/QOA mostly just defines the specification and they offer a reference implementieren. Is the idea now that someone writes their own implementation or just copies one into SFML?