3 ms·
If you use a external pallete (one that is not coming from the pi digits themselves) I don't think it's that interesting. With any random set of data you can fi
by worewood 5y ago
If you use a external pallete (one that is not coming from the pi digits themselves) I don't think it's that interesting. With any random set of data you can find a pallete that approximates the desired result
- JoeAltmaier 5y agoNot really true. It took 27M tries to find that one
- sedatk 5y agoI agree. Relying on an external data for interpretation is less impressive. The most impressive would be finding an exact GIF87a file. But, the cheating technique used here isn't a simple task either. I converted the smallest valid GIF file[1] (35 bytes) into decimal number: 540959129019042423917857241427143195931235689921032801204995597056286563376232988672 It's nowhere to be found in PI :) I couldn't even find "GIF87a". So, fuzzy search seems to be a must. [1] https://stackoverflow.com/questions/2570633/smallest-filesize-for-transparent-single-pixel-image https://stackoverflow.com/questions/2570633/smallest-filesiz...
- ehsankia 5y agoCan someone explain to me where the palette is defined? If it's not in the bytes of waldo.gif, is it provided by the website itself? If I save the gif file, I still see it as the same on my computer. Is it not true that the bytes of the gif actually 100% match the bytes of pi? Is there some extra metadata not included in the bytes of the file itself? If I were to send those bytes over the wire and save them to a file, would it look different?
- kundor 5y agoThe part that's from π is the actual pixel data, which is extracted in the Python snippet "waldo.tobytes()". More-or-less equivalently, you could use "list(waldo.getdata())". The GIF file as stored on disk has extra headers, and the pixel data's been compressed. So the whole file isn't found in the digits of π, just the pixel data itself. I'd guess the chance of actually finding a correctly formatted full GIF file in contiguous bytes of π is effectively nil.
- ehsankia 5y agoI see, I did find it slightly suspicious that they loaded the file using Image.open instead of just reading the bytes directly. Thanks!