Results 64 comments of Randy

One example is the `spng_set_png_file()` function which is essentially `spng_set_png_stream(ctx, file_read_fn, file)` where `file_read_fn` looks like this: https://github.com/randy408/libspng/blob/e5c1fc470fceaca08b8c30dc40768c28b82b9e12/spng/spng.c#L5024-L5036 For writing `file_write_fn` is used, it's right after `file_read_fn` in the same...

For progressive image encoding you have to initialize with `spng_encode_image(ctx, NULL, 0, SPNG_FMT_PNG, SPNG_ENCODE_PROGRESSIVE);` as described in the [Progressive image encoding](https://github.com/randy408/libspng/blob/master/docs/encode.md#progressive-image-encoding) section. I should probably do some extra error checking...

I did some experiments and reducing compression level gives the most predictable performance / file size tradeoff: https://libspng.org/docs/encode/#performance (these are docs for my PNG library but the encoder defaults are...

More tests that produce similar errors: https://gist.github.com/randy408/5a0b8cf8bea56bb6ee82fce7958c1b91, files are from https://github.com/glennrp/libpng/tree/libpng16/contrib/testpngs.