Live data from Hacker News

ThumbHash: A better compact image placeholder hash

evanw.github.io

61–70 of 123 posts

Re: ThumbHash: A better compact image placeholder hash

#62

Hello! I made this. People are talking about not wanting pictures to be initially blurry before they finish loading. I understand that too, and I'm not sure how I feel about it myself (I could go either way). But for what it's worth, I actually made this for another use case: I have a grid of images that I want to be able to zoom really far out. It'd be nice to show something better than the average color when you do…

This is cool. Do you happen to know if the thumbhash string has other uses? Perhaps grouping images by similarity or something?

I just wrote a quick function to compare visual similarity using the thumbhash and just adding up the difference at each byte position seems to work really well! (As long as the images are the same aspect ratio. I want to do more tests.)

Re: ThumbHash: A better compact image placeholder hash

#63
post #46
post #25

Earlier quoted context omitted.

If I was in a far flung part of the world I wouldn’t be perusing content rich bandwidth intensive websites. I’d be smoking a cig sitting on a worn mattress in the highest floor of an abandoned apartment building typing on a late 90s ThinkPad, negotiating prices on stolen credit card lists through encrypted IRC channels and moving illicit files on SSH servers based in foreign countries.

I'm in a far flung part of the world and a lot of my time is spent in very normal places like the AWS console, not doing any of those cool and dangerous sounding things.

Maybe you haven’t been flung far enough.

Re: ThumbHash: A better compact image placeholder hash

#64

Hello! I made this. People are talking about not wanting pictures to be initially blurry before they finish loading. I understand that too, and I'm not sure how I feel about it myself (I could go either way). But for what it's worth, I actually made this for another use case: I have a grid of images that I want to be able to zoom really far out. It'd be nice to show something better than the average color when you do…

This is cool. Do you happen to know if the thumbhash string has other uses? Perhaps grouping images by similarity or something?

That's a whole field of study on its own, called perceptual hashing. I surveyed these a while for amusement and the TL;DR is that all immediately obvious approaches tend to have particularly bad corner cases.

https://en.wikipedia.org/wiki/Perceptual_hashing

Re: ThumbHash: A better compact image placeholder hash

#65
post #8

I hate these blurry image thumbnails, much prefer some sort of hole, and just wait for a better thumbnail (look at youtube for this, or basically any site). I'd much rather see engineers spending more time making the thumbnails load faster (improving their backend throughput, precache thumbnails, better compression, etc). The blurry thumbnails have 2 issues 1) trick person into thinking they're loaded, especially if…

I think they're great, and it's not much different from progressive image loading that's been around for decades. Images going from blurry to sharp was a big thing back in the 1990's over dial-up AOL and MSN.

> I'd much rather see engineers spending more time making the thumbnails load faster

Generally it's a client-side bandwidth/latency issue, not something on the server. Think particularly on mobile and congested wi-fi, or just local bandwidth saturation.

> The blurry thumbnails have 2 issues 1) trick person into thinking they're loaded

I've never found myself thinking that -- a blurry-gradient image seems to be generally understood as "loading". Which goes all the way back to the 90's.

> 2) have a meaning that content is blocked from viewing

In that case there's almost always a message on top ("you must subscribe"), or at least a "locked" icon or something.

These blurry images are designed for use in photos that accompany an article, grids of product images, etc. I don't think there's generally any confusion as to what's going on, except "the photo hasn't loaded yet", which it hasn't. I find they work great.

Re: ThumbHash: A better compact image placeholder hash

#67
post #13

Cool tech, but i feel that for all even remotely modern connection types placeholders like this are obsolete and do nothing but slow down showing the real thing.

My modern connection is a mobile network where speed very much comes and goes depending on where I am.

There's nothing obsolete about phones on mobile networks.

Re: ThumbHash: A better compact image placeholder hash

#68

Blurring images or doing any sort of maths on the RGB values without first converting from the source-image gamma curve to "linear light" is wrong. Ideally, any such generated image should match the colour space of the image it is replacing. E.g.: sRGB should be used as the placeholder for sRGB, Display P3 for Display P3, etc... Without these features, some images will have noticeable brightness or hue shifts. Shown…

> A hilarious example of this is seeing Microsoft use Macs to design UIs for Windows which then look too light because taking the same image file across to a PC shifts the brightness curve. Oops. (Showing my age I’m sure) I distinctly remember how frustrating this was in the bad old days before widespread browser support for PNG [with alpha channel]. IIRC, that was typically caused by differences in the default white…

I think you're thinking about gamma correction. Before 2009, Apple used a display gamma of 1.8, so images displayed differently than they did on Windows systems (which used a gamma of 2.2).

Re: ThumbHash: A better compact image placeholder hash

#69
post #42

ThumbHash? seems more like MicroJPEG maybe? hash implies some specific things about the inputs and outputs that are definitely not true! cool idea to extract one piece of the DCTs and emit a tiny low-res image though!

I think this is very much a one way operation, which would imply some form of hash?

Re: ThumbHash: A better compact image placeholder hash

#70

Earlier quoted context omitted.

> A hilarious example of this is seeing Microsoft use Macs to design UIs for Windows which then look too light because taking the same image file across to a PC shifts the brightness curve. Oops. (Showing my age I’m sure) I distinctly remember how frustrating this was in the bad old days before widespread browser support for PNG [with alpha channel]. IIRC, that was typically caused by differences in the default white…

I think you're thinking about gamma correction. Before 2009, Apple used a display gamma of 1.8, so images displayed differently than they did on Windows systems (which used a gamma of 2.2).

You’re right, thanks for the correction!
Post reply on HN