ユーザーに入れてもらった文字を、画像の上に載せて、画像として吐き出したい、ってことがあったので、その際にやったことをメモ。 イメージは下のやつみたいな感じ。 よくわからんけど、こんな感じの作れる。 以下、ざっくりメモ。 →画像に文字とアイコンを載せて、画像生成。 header("Content-Type: image/jpeg"); $imageframe = imagecreatefromstring(file_get_contents("img/hoge.png")); //載せる画像 $result = imagecreatetruecolor(190, 70); //フィールド作成 $white = imagecolorallocate($result, 255, 255, 255); //白カラー作成 $blue = imagecolorallocate($result, 51,
![PHPで画像に文字を載せて、画像を生成する - mazeltov7のweb断片](https://cdn-ak-scissors.b.st-hatena.com/image/square/705d342d88646f14ddfff7ef422bfe89e9f5a006/height=288;version=1;width=512/http%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fm%2Fmazeltov7%2F20140911%2F20140911004825.png)