Home  >  Article  >  Backend Development  >  Image processing - How to enlarge the tile size of small images in PHP?

Image processing - How to enlarge the tile size of small images in PHP?

WBOY
WBOYOriginal
2016-08-23 09:17:482035browse

I want to be able to enlarge a small picture into a large picture like the Windows desktop, by filling it into the large size through tiles. How should I do it? I have been using Imagick for a long time and still can't find a clue.

Reply content:

I want to be able to enlarge a small picture into a large picture like the Windows desktop, by filling it into the large size through tiles. How should I do it? I have been using Imagick for a long time and still can't find a clue.

Imagick has a Montage tool.
Usage is as follows:

<code>To tile a set of images, allowing ImageMagick to pick the layout for you:


$ montage *.jpg out.jpg
To tile a set of 7 images, arranged in a single row:


$ montage *.jpg -tile 7x1 out.jpg
To tile a set of 5 images, arranged in a single column:


$ montage *.jpg -tile 1x5 out.jpg
To tile a set of 10 images, arranged in two rows:


$ montage *.jpg -tile 5x2 out.jpg
To specify that only a spacing of 2 pixels be used between images in the above setting:


$ montage *.jpg -tile 5x2 -geometry +2+2 out.jpg
Tried with: ImageMagick 6.6.9-7 and Ubuntu 12.04</code>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn