5 ms·
Using ImageMagick to make Contact Sheets (2013)
- thanatos519 6y agoGrids 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 6y agoThat'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 6y agoI 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/
- lloydatkinson 6y agoWhat is a contact sheet???
- dylan604 6y agoDidn't read the article did you? He goes into what a contact sheet is, its historical origins, and why it's still relevant today. It's not a long read. Don't be scared. You can do it. I'll hold your hand.
- kanobo 6y agoYou can learn all about contact sheets here: https://patdavid.net/2013/04/using-imagemagick-to-create-contact.html https://patdavid.net/2013/04/using-imagemagick-to-create-con...
- brudgers 6y agoIn 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
- ladberg 6y ago> 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 6y agoThe 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 6y agoI’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.
- brudgers 6y agoThe use case you're envisioning diverges more from traditional contact sheets more than what's in the article. Browsing pictures is not the same as having a picture of pictures. I can mark up the picture of pictures. I can print a picture of pictures to get an idea of how each picture will print. Creating a picture of pictures means I am certain of seeing the same thing later as I see now. To put it another way, back in the film days, someone might say "you can save several minutes by looking at the negatives instead of printing a contact sheet."
- brtkdotse 6y agoTangentially, 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 6y agoWhy 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