首頁  >  文章  >  後端開發  >  圖片處理 - php如何放大小圖片平鋪尺寸?

圖片處理 - php如何放大小圖片平鋪尺寸?

WBOY
WBOY原創
2016-08-23 09:17:481973瀏覽

我想做到和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>
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn