👩💻 Join our community of thousands of amazing developers!
For a tool I've written for my Spectrum I need to port a PNG to an 8bit Bitmap. The process being copy the png image to an HTML5 canvas element, then extract the pixels then generate the bitmap header and arrange the image data appropriately. I've always known about indexed palettes and their existence (as an option during exporting in Photoshop) but never really knew how they worked. After rolling it by hand (without compression), it's rather obvious - though only in retrospect! Generally (appa...