複数の画像を入力すると結合された1枚のサムネイル画像を作成するPHP用のライブラリです。
SNSなどでよく見かけるタイプの結合サムネイルです。
サイズは自動計算してくれます。某SNS用に作りました。
create combine thumbnail from multiple images.
System Requirements:
PHP v5.3+
ImageMagick
【実行例】
4枚の元画像を入力 / source image files
![](https://planet-green.com/wp-content/uploads/2017/02/thumb1.jpg)
![](https://planet-green.com/wp-content/uploads/2017/02/thumb2.jpg)
![](https://planet-green.com/wp-content/uploads/2017/02/thumb3.jpg)
![](https://planet-green.com/wp-content/uploads/2017/02/thumb4.jpg)
↓↓↓↓↓↓↓↓
連結して1枚のサムネイル画像を出力 / output a thumbnail image
![combine thumbnail library for php](https://planet-green.com/wp-content/uploads/2017/02/thumb-ptn4.jpg)
元画像は1〜4枚に対応。
・2枚の場合は上下に並びます。 / in case of two src images
・3枚の場合は横に。 / in case of three src images
コードと使用例。試しにGithub Gistにコードを載せてみました。