[x]We're back! After a failure of the drives in our database server, all data has been restored from last night's backup. The last 24 hours or so of submissions will likely need to be re-made but everything else should be okay. Please let me now if you notice anything not working as it should though. Thanks! -Petie


Users browsing this thread: 1 Guest(s)
PNGs missing chunks
#1
Hello! I was trying to rip sprites from a Java mobile game, specifically a Chinese Pokemon clone, but pretty much all the PNGs in the game lack the chunks necessary for it to be read (stuff like the file header, IDAT, etc.). I was wondering how I would go about fixing the PNGs. I included some samples, 2 being some of the few functioning PNGs in the game, and the other 3 being the ones lacking chunks.


Attached Files
.zip   Samples.zip (Size: 28.4 KB / Downloads: 70)
Reply
Thanked by:
#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:
#3
Thanks! I'll check it out and try to do that.
Reply
Thanked by:


Forum Jump: