3 ms·
Interesting write-up. I'm assuming there is a fixed number of images to fit into the layout which makes the problem a lot easier. Otherwise a bin-packing approa
by noelwelsh 13y ago
Interesting write-up. I'm assuming there is a fixed number of images to fit into the layout which makes the problem a lot easier. Otherwise a bin-packing approach might be warranted.
Somewhat related, I came across an interesting method to resize images called "seam carving". It uses a dynamic programming approach to remove rows or columns that seem uninteresting. The end result is that the important parts of the image are retained when the image is resized. The wikipedia page is fairly good: http://en.wikipedia.org/wiki/Seam_carving http://en.wikipedia.org/wiki/Seam_carving There are nice demos on Youtube as well: http://www.youtube.com/watch?v=6NcIJXTlugc http://www.youtube.com/watch?v=6NcIJXTlugc Now imagine doing this on the front-end (might be possible now in real-time) and the layouts this would allow!
- eru 13y ago> Now imagine doing this on the front-end Like, in the browser?
- noelwelsh 13y agoI can't tell if you're being sarcastic or not, so I'll give you the benefit of the doubt. Yes I mean in the browser. The convolution (edge-detection) is definitely possible in WebGL, and the dynamic programming algorithm probably is, so you could probably get sufficient performance in the browser to do this on multiple images in real time.
- eru 13y agoNot sarcastic. I just didn't know whether you meant the browser or eg the last layer of, say, PHP before it leaves the server.