How to create this type of contact sheet

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
32d2d7ee
Posts: 11
Joined: 2016-09-19T01:00:08-07:00
Authentication code: 1151

How to create this type of contact sheet

Post by 32d2d7ee »

I would like to create a sheet of 2 photos in different sizes and some rotated like this one Image

Photo 1 is the big one and the bottom row, photo 2 is rotated on the side.
I would like to control the sizes.

I've looked at montage and compose, yet the examples covered do not compare to this setup.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How to create this type of contact sheet

Post by snibgo »

Break the problem into smaller sub-problems. Then build the solution, starting at the bottom level first.

I would use "convert" (or "magick" for v7), first making three images: the main image, the four at the left, and the three at the bottom. Then append the first two of those sideways, then append that and the third vertically.

To make the group of four on the left, take an image, duplicate it three times, and append.

The group of three at the bottom is one image duplicated twice, one of these is rotated, and these three are appended sideways with a gap (which could be a fully transparent image).

Each of your small images seems to have a black border, and then a white border.

The main complication is calculating what sizes you want for each image.

Start simply, and build up from there. Do you know how to add borders? How to append images?
snibgo's IM pages: im.snibgo.com
32d2d7ee
Posts: 11
Joined: 2016-09-19T01:00:08-07:00
Authentication code: 1151

Re: How to create this type of contact sheet

Post by 32d2d7ee »

After much reading and trial and error I came up to this command below:
Questions:
1) is this a good approach?
2) Tips and tricks?

magick convert -units PixelsPerInch -size 2362x3543 xc:white
( ( 1979030.jpg -auto-orient -rotate 270 -resize x414 -splice 0x23 ) -duplicate 5 -append ) -geometry +0+-23 -composite
( 1979030_2.jpg -auto-orient -resize x2600 ) -geometry +635+0 -composite
( 1979030_2.jpg -auto-orient -rotate 270 -resize x827 ) -geometry +0+2716 -composite
( ( 1979030_2.jpg -auto-orient -resize x827 -splice 10x0 ) -duplicate 1 +append ) -geometry +1244+2716 -composite -density 300 result.jpg
Post Reply