Something like
lodepng_decode_file(&temp, &tempWidth, &tempHeight, filename, LCT_PALETTE, 8)
will properly get the index for each pixel in temp, but I can't find a simple way to get the palette that corresponds to these indices.
It seems the answer is to mirror the body of lodepng_decode_memory and grab the info before the lodepng_state_cleanup which isn't too bad, but a readily available function might help others with indexed musings.
Something like lodepng_decode_file(&temp, &tempWidth, &tempHeight, filename, LCT_PALETTE, 8) will properly get the index for each pixel in temp, but I can't find a simple way to get the palette that corresponds to these indices.
It seems the answer is to mirror the body of lodepng_decode_memory and grab the info before the lodepng_state_cleanup which isn't too bad, but a readily available function might help others with indexed musings.