godratio
These kinds of post and writes up should be put somehwhere along with the learning materials being developed.
brothir
Can't get this working at all. 'decompressed_png' and 'image' are just 0s after sh_zlib_decompress and sh_png_defilter.
1 2 | glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 256, 256, 0, GL_RGB, GL_UNSIGNED_BYTE, Image); <----- |
Enyo Enev
According to the color type it says "2" that translated from PNG Doc means it is RGB triplet.
Hello, thanks for the article. That's some good resource on the internet.
I noticed that in the filtering part you don't check the boundary when you access previous row; that may be a critical bug if the first row is filtered.
Also, adler32 checksum is 4 bytes not a 2 bytes. It does not really affect the decoder here since it is at the end of the last IDATA chunk, but I am dropping it here so that the reader is aware of it.