Heim  >  Artikel  >  Backend-Entwicklung  >  图片处理 - php如何把小图片平铺尺寸放大?

图片处理 - php如何把小图片平铺尺寸放大?

WBOY
WBOYOriginal
2016-08-23 09:17:481973Durchsuche

我想做到和windows的桌面一样能把小图片放大为大图片时,是通过平铺填充到大尺寸里,我应该怎么做,我用Imagick搞了半天还是找不到头绪。

回复内容:

我想做到和windows的桌面一样能把小图片放大为大图片时,是通过平铺填充到大尺寸里,我应该怎么做,我用Imagick搞了半天还是找不到头绪。

Imagick有个Montage工具。
用法如下:

<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>
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn