Creating a photo collage image as attached using PHP from several images

放肆的年华 提交于 2019-12-09 06:54:50

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!