开发者

How to optimize the space in a A4 sheet?

I need to put many pictures into a sheet (A4) but I need an algorithm to op开发者_开发知识库timize the space used in order to put the maximum numbers of possible images into the sheet.


That's quite a generic problem... if there are no assumptions at all on the dimensions of the images, your problem is exactly the knapsack algorithm, two-dimensional.


You could try to calculate all combination of the images on the sheet. If this is too time intensive you can begin with the biggest images and then try different positions of the smaller images this should let you calculate a good arrangement in a fairly small amount of time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜