0

I would like to preview how one single image (768x1024 px .tiff) would look as a pattern by generating an output file where it is tiled in such and such a way (4x4, 5x5, etc.). The image should be scaled down somehow but not cropped and there should be no border so the transition is seamless.

How can I generate such a montage on the command line?

1 Answer 1

2

Of course you can use montage from the Imagemagick suite of utilities. The image has a 3:4 aspect ratio; preserve that in the geometry setting to avoid cropping related issues and borders. It's just about repeating that file name as input in the command, and basic arithmetic. Maybe there was something in the manual, but otherwise, assuming the 4x4 "tiles" example, you can try:

montage $(printf 'yourfile.tiff%.0s ' {1..16}) -geometry 192x256 -tile 4x4 -unsharp 0x.5 output.tiff

The command substitution is unquoted to generate the required tokens. With a final touch of sharpen.

2
  • If someone sees something off in the way printf is used please suggest an edit or let me know. Thank you!
    – user44370
    Oct 6, 2014 at 21:58
  • Is it just me, or does montage / ImageMagic now take each input file only once, even if repeated multiple times?
    – tanius
    Jun 17, 2015 at 7:58

You must log in to answer this question.