Well, it looks like I'm going to have to eat my own words. I decided to check if you could actually make thumbnails with zigimg, and more importantly, if you could write a good C interface to the tool. It turns out that, for a number of reasons, they don't use zig's std.Io reader/writer interfaces, which means that you can only use it with files - not with sockets, memory buffers (reading is fine, but you can't write to an allocating buffer) or anything else. This meant that I had to fork the library and rewrite a few parts to use generic streams instead. This is important because, if you want the library to be usable from something like nodejs that has it's own event loop for reading and writing to files, it should either work on memory buffers and leave the IO to node, or offer some mechanism (like the std.Io interface) to implement the IO through node-api primitives.
Anyway, the end result is this:
https://codeberg.org/cirefl/spell
Apparently node has a lot of options for using C libraries (
https://nodejs.github.io/node-addon-examples/getting-started/first), and they all seem to be pretty good, but I don't want to install node.