image packing algorithm for photoshop
October 26, 2012 11:52 PM   Subscribe

I have 200 scanned images of matchboxes. The matchboxes have different dimensions. I want to arrange the images automatically, with as few gaps as possible, into a large image to be printed as a poster. I think what I need is a "packing algorithm" but I don't know how to proceed. Is there a way I can do this automagically in Photoshop or with an existing freeware program? I don't need any special effects, just to simply arrange the images with the most efficient use of space.
posted by Infernarl to Computers & Internet (6 answers total) 10 users marked this as a favorite
 
Maybe Picasa's image collage feature?
posted by xyzzy at 12:40 AM on October 27, 2012 [1 favorite]


The term you are looking for is nesting (wikipedia). A search for image nesting software (google) turns up several different options.
posted by zinon at 12:41 AM on October 27, 2012 [1 favorite]


in photoshop this can be done with file > automate > contact sheet
posted by ouke at 1:22 AM on October 27, 2012


The problem with using a nesting algorithm is that it will arrange everything in straight rows and columns like a contact sheet, which is a rather dull layout for a poster. If you look at Peter Blakes matchbox pictures he alternates between vertical and horizontal placement so that the slight differences in size don't really matter.

Also unless they are all the same colour you will probably want to swap them around manually to get a decent colour balance.
posted by Lanark at 6:33 AM on October 27, 2012 [1 favorite]


This is a common thing in game development (or other 3d texture work), sometimes called texture packing, where you want to get as many images onto one 2d texture as you can.

There are various tools available, if you're on Windows I've used this one before and it worked fine for me: unchaos [garagegames.com]
(Make sure your output image is big enough to hold everything!)

It will just try and pack everything together as efficiently as possible, so it depends how artistic you are trying to make your poster (however if you set a decent border around each one then add a background and drop shadows in photoshop it could still look quite nice).
posted by samj at 6:45 AM on October 27, 2012 [2 favorites]


If this is an artistic effort (rather than, say, an insurance record), then don't you really want to do it by hand, so that you can control the color and theme aspects of each tile?

Sure, it's an afternoon's work, but fiddling around with automation tools will take that long anyway.
posted by rokusan at 10:07 PM on October 27, 2012 [1 favorite]


« Older They aren't pretty, but I need 'em!   |   Explain 3rd Party Twitter Authorisers for me Newer »
This thread is closed to new comments.