QOI
Moderator: Moderators
QOI
Attached is a QOI decoder including a simple demo that loads a external QOI image containing a single frame of the selected fighter into a texture. Obviously this makes more sense when the images you're loading are a lot bigger than in this example, but the approach would remain the exact same.
Use the arrow keys to select a fighter.
K
- Attachments
-
- QOI.zip
- (69.47 KiB) Downloaded 608 times
Re: QOI
That is very neat! I've been keeping an eye on this format and your implementation looks solid. With a cool demo as usual
What kind of compression ratio do you get for the included images?
What kind of compression ratio do you get for the included images?
Re: QOI
Hej Ville,
K
It varies from situation to situation, but in this case the original PNG images were 59228 bytes total, while the QOI images are only 36970 bytes. Due to the limited color palette & large number of masked pixels most of the data-chunks are either RLE or indexed which explains the impressive compression ratio.
K
Re: QOI
That is impressive indeed. When I read the QOI spec I thought well this looks nice and simple but it will surely be much worse compression than PNG for most pictures. But it turns out it is really quite ok as a general image format. The simplicity makes it super fast and the implementation very compact.
A bold move by the author to ignore the complexity of modern formats and just go back to basics.