A
A
Andrey R2018-05-09 08:19:56
Images
Andrey R, 2018-05-09 08:19:56

How to calculate the proportions of N images so that they occupy the entire area of ​​a certain size?

I want to get the Nth number of server images with a curl, and then "glue" them into 1, while changing their sizes, so that I get a table with several columns and rows.
An example of how to do it manually: in Photoshop, we can create an image, throw other images there as new layers, and then reduce their size and position them.
Task: We have an image of 600x400 pixels, on which 6 images should be located. (From now on, I don’t know how to calculate). You can place 3 images in each line, then 600/3 is the maximum image width and 400/2 is the maximum height.
How to calculate the optimal number of rows and columns of images?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
Griboks, 2018-05-09
@Griboks

How to calculate the optimal number of rows and columns of images

What is the optimization criterion?

D
Dmitry, 2018-05-09
@demon416nds

Is 100% coverage important?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question