T
T
TAURUSiv432013-09-18 10:41:11
User interface
TAURUSiv43, 2013-09-18 10:41:11

Algorithm for creating VK collages

Good afternoon,
I always liked the mechanism that combined pictures into collages in VK posts. I want to repeat it for myself in order to understand the algorithm. Perhaps someone has done something similar and can tell the mechanism. I have already tried using the algorithm for packing pictures into atlases, but it does not take into account that pictures can have different scales and must be perfectly inscribed in a rectangular area.

Thanks




Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
pxx, 2013-09-18
@pxx

In general, the problem cannot be solved without trimming the edges.
I think they have a lot of template variations for different numbers of images, probably even with 1-2 parameters floating in the range (for example, row height). Further, based on the initial number of images, all templates are sorted out and the one for which the cropping will be minimal is calculated.
For 1-10 pictures, you can have unique amazing templates, for more - arrange them in rows.

P
pxx, 2013-09-18
@pxx

And also look towards Masonry , perhaps this functionality is enough.

E
Error_403_Forbidden, 2015-12-29
@Error_403_Forbidden

I have an Android application where I have implemented such a mechanism.
Is it still up to date?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question