On Thursday, 19 September 2019 at 05:22:37 UTC, Mike Parker wrote:
On Thursday, 19 September 2019 at 03:47:05 UTC, Shadowblitz16 wrote:
Is there a way to make a indexed graphics library that can handle importing and exporting true color images?

I don't see why not.


I would guess something like this could be simulated with pointers and references right?

If you want to, say, take a 24-bit or 32-bit and treat it as an 8-bit image, you'll probably want to actually do a conversion rather than a simulation. In which case you'd probably be better off just using an existing C library like FreeImage. You can find a binding here:

https://github.com/BindBC/bindbc-freeimage

Otherwise, you'll want to hit up a graphics programming forum for resources on image conversion. Two possibilities:

https://www.reddit.com/r/GraphicsProgramming/

https://www.gamedev.net/forums/forum/5-graphics-and-gpu-programming/

I wanted to do 4bpp 16 color graphics.
and I didn't want to load anything unnecessary in the image like the palette but instead supply it myself as a Color[16];

Reply via email to