Live data from Hacker News

The algorithm for a perfectly balanced photo gallery

crispymtn.com

31–40 of 104 posts

Re: The algorithm for a perfectly balanced photo gallery

#31

Is it supposed to reload previously viewed images when the user scrolls up or down?

Yes, we figured the page scrolls slow if there are too many photos in the DOM at the same time so the lazy-load-function also removes them when out of scope.

Re: The algorithm for a perfectly balanced photo gallery

#32
post #21

Earlier quoted context omitted.

I agree, that looks very nice. I might be wrong here but I think the background is just the picture, although scaled and has got many filters on it.

That's an idea I've actually seen done but executed poorly many times. What they got right this time is adding the shadow around the image making it easy to distinguish from the background, and blurring it so heavily that none of the detail is distracting. Very nicely done.

Rdio's app (rdio.com) also nails this.

Re: The algorithm for a perfectly balanced photo gallery

#33

What's just as impressive is the full size view of the image. The background brings the ambient colour of the photo to make it more immersive. Very nice!

I agree, that looks very nice. I might be wrong here but I think the background is just the picture, although scaled and has got many filters on it.

Actually, you're right! It's the same picture, scaled down to around 500x500 and with a heavy gaussian blur applied to it. The trick is to have a subtle grain effect over it to eliminate gradient artifacts.

Re: The algorithm for a perfectly balanced photo gallery

#34

It like how it looks, but much like Flickr I dislike how it's biased towards landscape pictures. Some of my best photos are portrait, but they get overshadowed by the landscape ones. I imagine the algorithm to cater to both is much harder, because you wouldn't be able to treat each row in isolation, can it actually be solved to a good standard?

If you prefer portaits: use columns instead of rows and scroll horizontally instead of vertically.

If you want to avoid the bias you have to try something else: e.g. reorder the images, overlap them, convert to square format…

Re: The algorithm for a perfectly balanced photo gallery

#35
WordPress recently added 'Tiled' galleries via their JetPack plugin. It seems like a similar approach. You can see an example gallery here:

http://ma.tt/2013/07/jay-z-picasso/

Additional info: http://jetpack.me/support/tiled-galleries/

Code: https://github.com/crowdfavorite-mirrors/wp-jetpack/tree/mas...

Re: The algorithm for a perfectly balanced photo gallery

#36
post #21

Earlier quoted context omitted.

That's an idea I've actually seen done but executed poorly many times. What they got right this time is adding the shadow around the image making it easy to distinguish from the background, and blurring it so heavily that none of the detail is distracting. Very nicely done.

Rdio's app (rdio.com) also nails this.

Rdio does some fantastic design work. Just a shame their engineering is so bad that I can't even use the app.

Re: The algorithm for a perfectly balanced photo gallery

#38

he writes an excellent example of why "all that computer sciency stuff" is usefull in day to day programming, yet still wants to take pride in his ignorance, like this is some strange sort of fluke.

You're being a little harsh here. I think he was actually trying to impart the idea that it's worthwhile to have a foundation in CS, even if you don't necessarily work on deep algorithmic code every day. He drew on some (perhaps foggily remembered) CS background to successfully solve a problem, so why knock him?
Post reply on HN