2

Using imagemagick I am trying to create a similar image like this tile pattern: OUTPÙT

From this image: SOURCE

I can do simple tile by using:

convert table.png -write mpr:tile +delete -size 3000x3000 tile:mpr:tile table.jpg

However, is there any way to achieve the above result using imagemagick

1 Answers1

3

Using ImageMagick you'll need to do some duplicating, rotating, and appending to get that result. Here's a simple IMv7 command that creates the tile with four tables...

magick table.jpg ( +clone -rotate 90 ) +append ( +clone -rotate 180 ) -append tabletile.png

That reads in the image of the single table, makes a clone inside the parentheses and rotates it 90 degrees.

After the parentheses it appends that rotated clone horizontally to the original input image using "+append".

Then inside parentheses again it makes a clone of that appended result and rotates it 180 degrees.

Outside that parentheses it appends those two pieces vertically with "-append".

Finish by writing the result to the output file.

If you're using IMv6 use "convert" instead of "magick".

If you're running that command on a *nix OS you'll probably need to escape those parentheses with backslashes "\(...\)".

GeeMack
  • 4,486
  • 1
  • 7
  • 10
  • Hi thanks for the answer. One more thing I wanted to ask. Is there any way to process this in batch using mogrify (I mean what would be the command)? – Katherine Elizabeth Kath Sep 18 '20 at 12:27
  • It doesn't look like "mogrify" can do some of the things this task requires. If you need to do this process to a directory full of images, you'll probably have to use IM's "convert" command in a "for" loop in your shell or script. – GeeMack Sep 19 '20 at 02:02