Skip to content

Loading pics from the middle

3 pointsmetaprinter1 comment
On HN

The DOM is great and all but I'm increasingly frustrated by slow loading of images on mobile devices. Can some smart person figure out how to load images starting from their center?

Comments

You could use "interlaced" or progressive images. (I don't mean scanlines like old TV signals.) GIF, PNG, and JPG use the same idea: it sends stores the pixels out of order, and progressively fills in the image all over instead of from the top down.

Interlaced GIFs use a three-pass system. Interlaced PNGs use a 7-pass algorithm. Progressive JPGs actually decompose the frequencies and send the "most important" ones first. http://www.libpng.org/pub/png/book/chapter08.html#png.ch08.d...

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.