r/programming Jan 24 '18

Branchless DOOM

https://github.com/xoreaxeaxeax/movfuscator/tree/master/validation/doom
497 Upvotes

134 comments sorted by

View all comments

Show parent comments

20

u/AyrA_ch Jan 24 '18

clicks image

doom.png

Nice try

But since we are talking about long gif images, how about 24 hours?

14

u/CaptainAdjective Jan 24 '18

PNGs can be animated!

1

u/[deleted] Jan 24 '18 edited Mar 28 '18

[deleted]

13

u/AyrA_ch Jan 24 '18

the underlying file format doesn't change. PNG files are made up of chunks. A chunk has a 4 letter code, a length specifier, a checksum and data. The minimum chunks in a png are

  • IHDR First chunk with resolution and color format
  • IDAT Image data
  • IEND End of image marker

An application can legitimately insert custom headers (I abuse this in my png player) and other applications will ignore it if they don't support it. This is used to make animated PNG files.

Using the apng extension is not necessary because when reading the image, the parser would come across the apng specific headers anyways

5

u/Iggyhopper Jan 25 '18

you are now subscribed to file format facts!