
Using ImageMagick to make Contact Sheets (2013) - brudgers
https://patdavid.net/2013/04/using-imagemagick-to-create-contact.html
======
thanatos519
Grids are easy. I recently wanted to print almost 600 randomly-sized images on
as few sheets of paper as possible. I could only find academic papers and
maybe-working academic byproduct code.

So I made
[https://github.com/trathborne/guillot](https://github.com/trathborne/guillot)

It was also an exercise in learning Ruby, and it only depends on Ruby, *nix
pipes and GraphicsMagick, the more-open way-faster descendant of ImageMagick.

Share and enjoy!

~~~
auxym
That's neat. Do you think it could be modified for nesting, in the context of
laser cutting? Last I checked there were no OSS nesting options, o my
commercial options marketed for industrial production.

~~~
thanatos519
I don't think guillot would be right place to start, since it was only
intended to do one thing: Place axis-aligned rectangles for guillotine cuts.
That is, you can cut out all of the rectangles only by cutting all the way
across the paper. I wanted to be able to cut the pages up with a paper trimmer
(because I am not very good with scissors! :-P ), and this restriction made
the brute force algorithm relatively effective.

Laser cut nesting optimization is the opposite of guillotine cuts: irregular
shapes with arbitrary rotations allowed.

This 2 years inactive, but still working open source tool is more likely to
get you where you want to go: [https://deepnest.io/](https://deepnest.io/) or
the web version [https://svgnest.com/](https://svgnest.com/)

------
ladberg
> Wait a few minutes, and voila! Instant contact sheet for me to peruse on my
> local machine.

A few minutes of delay kinda negates the whole point I feel like. It'd be much
faster to have an X server running on the backup server and VNC in or run a
file manager over an X tunnel.

~~~
thanatos519
The article was written in 2013. With a modern CPU and SSD, it wouldn't take
so long.

Besides, the file manager still has to scale the images (same work as the
contact sheet process) and scrolling the view over VNC or X will push the same
pixels over the pipe repeatedly so will be even slower.

~~~
ladberg
I’d think the CPU and disk time is relatively negligible in this task and
Dropbox is the real bottleneck. Viewing the pictures and scrolling in VNC or X
should only take a few seconds, not minutes.

------
brtkdotse
Tangentially, is anyone aware of a hosted version of ImageMagick with a REST
API in front of it? This would solve a pretty big problem for me.

~~~
tn1
Why not simply use the bindings available for your language? Every mainstream
scripting language at least has ImageMagick bindings.

At least, I'm assuming you're trying to generate images from something AWS
Lambda-ish, which AFAIK allows you to run any code including native modules

------
lloydatkinson
What is a contact sheet???

~~~
brudgers
In film photography, contact printing involves placing a developed negative
directly over a piece of print paper and exposing the combination to light to
create a print on the print paper.

With sheet film, there is a simple 1:1 relationship between the developed
negative and the contact print.

However with roll film there are multiple images on a developed roll. A
contact sheet is made by contact printing developed roll film and is typically
used to catalog the images for future reference and/or evaluate images for
enlarged printing.

Another way to think about it is a contact sheet is a set of thumbnails
contact printed from 35mm or medium format roll film.

[https://en.wikipedia.org/wiki/Contact_print](https://en.wikipedia.org/wiki/Contact_print)

