Show HN: My first WebGL demo, the first self-extracting PNG ever?
demoseen.com
demoseen.com
As far as I know, this is the first ever case of a self-extracting PNG -- the file is a PNG that first is interpreted as HTML, which then unpacks the compressed code within the PNG to start the second stage. I plan to write a blog post about how I got the size down as far as it is, but feel free to ask any questions you may have, as I'd love to see this technique spread!
Edit: Requires Chrome and Firefox -- has been tested heavily on Windows and OS X, but this will eat your CPU and GPU alive.
It doesn't seem to eat my processor too much. In Chrome with AMD processor it's sitting at about 25% CPU usage.
It isn't too be on the CPU for most people, but for some reason it's eating a massive chunk of CPU-time for some people -- seems to be only in the latest Firefox nightlies, but i'm not seeing it here, so I'm unsure of what it could be.
That being said, this uses only 10-12% CPU on my quad-core machine.
magister.html: PNG image data, 1242 x 1, 8-bit grayscale, non-interlaced
If you look at this in an image viewer, it's as advertised: a long black bar.So what this is is some garbage data with a PNG header, a token PNG image, and some HTML that bootstraps a javascript program whose main body looks like binary garbage. But it's not a self-extracting PNG, it's a very strange HTML document with a PNG header.
That's not to say it's not impressive, but the running demo looks nothing like the PNG data.
Though interestingly, the behavior in all three Chromes is wildly different: Dev runs 60% CPU use in the rendering process, Beta sometimes uses nothing, sometimes 60%, and Stable uses the same 60% + 120% on "google chrome helper". The alert test works (shows a canvas element) in both Dev and Beta, Stable shows me a "page unresponsive" after a couple seconds and never alerts anything.
Other GL tests work just fine in all 3. I'll be happy to test other things if you can come up with them :)
Uncaught ReferenceError: S is not defined
about:gpu
Also helpful about:flagsThis runs fluidly on my Chrome/Sandy Bridge/Ubuntu setup.
It crashes though, when you run it with this hash: 0FP$9jj!i1!!!DPD!t!!!!!~ It spun up 5M threads before it died, which was admittedly fun to watch.
Link: http://ha.ckers.org/blog/20070623/hiding-js-in-valid-images/
To see if your browser supports webgl, go to http://webglreport.sourceforge.net/
On a pokey mac mini, I get a few frames per second and about 5-15% CPU use in Firefox and chrome
Using an old NVIDIA GeForce 6200 with driver 8.17.12.7533 on a 32-bit Windows Vista SP2, browser was Google Chrome 12.0.742.122.
Edit: Just saw your explanation. Cool - thanks!
Mac OS X 10.6.8 all updated / Google Chrome 12.0.742.122 / MacBookAir3,2 / 2.13 GHz / 4GB RAM
Would be interesting to know if you have, indeed, found an exploitable driver bugs.