views:

144

answers:

2

I've got a list of images with dimensions for each image. I need to select and layout a group of images from that list so they fit on screen with slight overlaps, and no gaps. (gradient in the overlap to avoid a sharp transition)

I've researched 2d box packing algorithms, but they all assume that you need to use all the items, and, of course, that gaps are better than overlap.

If needed, I can downscale some or all of the images, however I can't upscale them.

Is there a good way to do this?

+1  A: 

Maybe you could apply the 2d box packing algorithms you have researched, which assume you need all images, and just apply them using a selected group of images. This group could have been previously generated using any criteria. However, using the image's size seems adequate, because having a group of similarly-sized images eases the packing of said images. To achieve the overlapping you could use smaller dimensions for each image in the packing algorithm and then move each image of the group according to its difference in size from the packing algorithm and actual size.

Marc Müller
A: 

I asked a similar question back in April. Don't know if you saw it, or if any of the answers suit your needs. Look here

Scott Evernden