How resizing and fitting different images in a fixed space as done in http://www.ted.com/talks/browse and search results jinni.com.
Any leads how this can be done, like with jQuery or with php support something.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The way it’s done on the TED website, they use Flash and only one aspect ratio for all the images, which makes the algorithm fairly trivial. For an even more stylish look (and for serious geek points), you could pick a couple of aspect ratios (one square, one portrait, one or two horizontal) and custom-build an algorithm to solve a subset of the 2D bin packing problem efficiently.
Better yet, you could use some nifty algebra to automatically decide which sizes would fit into a rectangle of a specified width and have the algorithm do all the resizing for you automatically. That may sound like NP-hard black magic, but A List Apart actually had an excellent article about it some time ago. It even has a simple explanation of the math involved and PHP code you can download and modify to your needs:
Automatic Magazine Layout — Example 1