libspng
libspng copied to clipboard
Simplified API
This issue tracks nice-to-have functions that can be implemented on top of existing functionality.
Decode from file
Similar to stbi_load()
int spng_decode_file(const char *filename, void **buf, struct spng_ihdr *ihdr, int fmt, int flags);
Depends on https://github.com/randy408/libspng/issues/47
This does not allow for a custom memory allocator nor context flags, which is a drawback.
out-of-scope? I would prefer not having this or at least being able to disable it with a define (I avoid dependency to crt when possible).
File I/O is already supported through opened FILE*
's, so fread()/fwrite()
makes it depend on the crt(?)
Paths are not supported at the moment because it's not as straightforward on Windows (some libraries convert the path string, some don't).
Yes, FILE is crt. I personally can't get rid of crt, but for others it might be a selling point.