问题
How can i create a collage from a large number of images as per below using PHP scripts?
I am also looking at creating different sizes A0, A1, A2 sized images depending on the number of pictures used in the collage.
Thanks
回答1:
I suggest using Imagemagick. There are some excellent tutorials on Mikko's blog:
http://valokuva.org/?cat=1
Take a look at the Polaroid example, here:
http://valokuva.org/?p=37
The Reflection tutorial demonstrates how to create composite images:
http://valokuva.org/?p=82
EDIT
Here's a few more useful links:
Image Processing (ImageMagick)
http://php.net/manual/en/book.imagick.php
Imagick::readImageFile
http://www.php.net/manual/en/function.imagick-readimagefile.php
Imagick::rotateImage
http://www.php.net/manual/en/function.imagick-rotateimage.php
Imagick::scaleImage
http://www.php.net/manual/en/function.imagick-scaleimage.php
PHPro Tutorial
http://www.phpro.org/tutorials/Imagick.html
And finally...
This one is a good starting point:
Programmed Positioning of Layered Images
http://www.imagemagick.org/Usage/layers/#example
回答2:
This is exactly what you are looking for.
来源:https://stackoverflow.com/questions/3092583/creating-a-photo-collage-image-as-attached-using-php-from-several-images