Users browsing this thread: 1 Guest(s)
PNGs missing chunks
#2
It is still PNG files, but with PNG header, chunk name + crc32 removed, making everything in fixed order.

For example, "img_220.mid" can be read as:
Code:
00  12 bytes  PNG IHDR header
- 00  4 bytes  width [= 286]
- 04  4 bytes  height [= 153]
- 08  1 byte  bit depth [= 8-bpp]
- 09  1 byte  color type [3=is RGB + has palette]

0c  2 bytes  chunk length
if type has palette , then it is PLTE chunk, then followed by tRNS for Alpha.
After that, the next chunk is IDAT chunk.

You can read more about PNG chunks here:
http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html

For example, "img_2.mid" has color type = 6, so it is RGB + has alpha. No palette or PLTE chunk.

You can fix the images by reconstructing all headers back.

Good luck,
- Rufas
Reply
Thanked by:


Messages In This Thread
PNGs missing chunks - by D.M. - 11-06-2020, 09:04 PM
RE: PNGs missing chunks - by rufaswan - 11-09-2020, 05:26 PM
RE: PNGs missing chunks - by D.M. - 11-09-2020, 07:06 PM

Forum Jump: