I want to arrange some elements (images) as a puzzle (like this: http://cl.ly/e8e23acbbb096eb6ee86). The problem is that the elements are with different (random generated) dimensions and they don’t fit each other.
Does anyone have an idea how could I arrange them as it’s shown on the screenshot?