У меня есть эта тестовая страница http://thechozenfew.net/projects/write_font.php, которая генерирует текст в поле ввода в качестве шрифта. Каждая буква - это отдельная картинка. Как мне объединить все эти картинки в одно изображение с помощью php-скрипта?
Это то, что я пробовал до сих пор, но изображения появляются друг на друге.
Header ("Content-type: image/gif");
$image1Url = "../images/avatar.png";
$image2Url = "../images/key.png";
$image3Url = "../images/safari.png";
$image1 = imageCreateFromPNG($image1Url);
$image2 = imageCreateFromPNG($image2Url);
$image3 = imageCreateFromPNG($image3Url);
$colorTransparent = imagecolorat($image1, 0, 0);
imageColorTransparent ($image1, $colorTransparent);
$colorTransparent = imagecolorat($image2, 0, 0);
imageColorTransparent ($image2, $colorTransparent);
$colorTransparent = imagecolorat($image3, 0, 0);
imageColorTransparent ($image3, $colorTransparent);
imageCopyMerge($image1, $image2, 0, 0, 0, 0, 96, 96, 100);
imageCopyMerge($image1, $image3, 0, 0, 0, 0, 96, 96, 80);
ImagePng ($image1);
ImageDestroy ($image1);
ImageDestroy ($image2);