On Monday, 8 August 2022 at 16:07:54 UTC, wjoe wrote:
your lib would not just be @nogc but @no_allocation.
All image decoders in gamut need to malloc more than just for pixel data. Even STB allocates for format conversion, zlib buffers, 16-bit <-> 8-bit, etc. it's not just pixel data. Single allocation pessimizes the size a lot because since you haven't encoded yet, you need to prepare a buffer for a large worst-case.
