Laying out multiple images of diff to minimize wasted space
Posted: 2009-01-11T16:50:35-07:00
I have dozens of images with different canvas sizes that I want to layout efficiently without changing their relative scale. Is there an alternative to montage that will pack the images together as best it can minimizing wasted space?
using ImageMagick 6.4.8 2009-01-06 within cygwin environment:
First I trim each as they all have excessive whitespace all around.
mogrify -trim *.gif This works great.
Now they are all different sizes. I dont want to resize as these images need to stay at their original scale.
If I use montage as in:
montage *.gif -geometry +10+10 montage_geom.gif
then the images are laid out in a regular grid with lots of wasted space between them.
Whereas what I want is for them to be laid out to minimize wastage. Eg of paper when printed or plastic if cut out using laser cutter.
I am sure this must have been done before. Has anyone round here solved this or got any alternative ideas?
Rgds,
James
using ImageMagick 6.4.8 2009-01-06 within cygwin environment:
First I trim each as they all have excessive whitespace all around.
mogrify -trim *.gif This works great.
Now they are all different sizes. I dont want to resize as these images need to stay at their original scale.
If I use montage as in:
montage *.gif -geometry +10+10 montage_geom.gif
then the images are laid out in a regular grid with lots of wasted space between them.
Whereas what I want is for them to be laid out to minimize wastage. Eg of paper when printed or plastic if cut out using laser cutter.
I am sure this must have been done before. Has anyone round here solved this or got any alternative ideas?
Rgds,
James