mastodon.gamedev.place is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server focused on game development and related topics.

Server stats:

5.5K
active users

My ranking of the APIs of various image decoding libraries:

1. stb_image tier: libwebp

Call a function. You're done.

2. Good tier: libheif (also handles avif)

A bunch of functions you need to call in sequence, all presented as a neat and short program in the README.

3. Okay tier: libpng, libjpeg.

You have to go through a narrated guide on what to call. You can get the work done, but you have to wade through super important stuff like low-quality decoding in case you want to run on Amiga.

4. Crap tier: libjxl

You get doxygen docs, so you don't know where to start. The example program is your best bet, but it is convoluted and outputs each color channel as a float.

The documentation is sometimes vague. To check if a file might be JPEG XL, you have to provide "the beginning of the file". The function may fail and ask for more data. The documentation never specifies how much is needed.

Reading the source code shows that it's 12 bytes.

Aras Pranckevičius

@wolfpld and then a separate category is LibTIFF that does things like getenv deep from within library functions. Getenv does not even exist on some platforms I need LibTIFF on…

@aras I did a quick look and these seem to be some internal configuration options? Which is great, your program might suddenly fail because a variable has been set somewhere.

You can just remove those calls, but oh no, you're now maintaining a fork of a 35 year old library that had the latest release... let's see... 2 weeks ago.

And the release notes explicitly state that some tools will no longer be supported because they have security problems that no one wants to fix.

Oh, wow.