0

I am not sure if this is the right tag to ask this question.
I have see many facebook apps which generate a customized image as output of the app wherein profile pics of users and their friends are superimposed or say combined to make one single image. After that tagging is done as well.
Can anybody tell me how is it done?
I am trying to make a similar app using php
Thanks in advance

Sandiip Patil
  • 456
  • 1
  • 4
  • 21

2 Answers2

1

take the photos as described here: How to use Facebook graph API to retrieve fan photos uploaded to wall of fan page?

then merge them like this: http://php.net/manual/en/function.imagecopymerge.php

or using some component/framework/library you like, e.g. GD http://php.net/manual/en/ref.image.php.

Community
  • 1
  • 1
darlinton
  • 2,131
  • 16
  • 21
  • Thank You Darlinton, thats really a nice function. +1 for you. Do u have any working example of it? That will be great help. – Sandiip Patil Nov 18 '11 at 13:56
  • 1
    @SandiipPatil i don't have a full example for exactly what you want, but if you break it down into smaller task you can find code examples. for instance, considering you have the user photos, look for how to mix images regardless they are photos or not. – darlinton Nov 20 '11 at 13:09
1

I've used Imagick for a while - really easy. Its done by making calls to libraries such as the ones listed here and in @darlinton's answer. The libraries have functions like borderImage, cropImage, resizeImage, compositeImage.

Lix
  • 47,311
  • 12
  • 103
  • 131