• Raspberry PI Boom! What a useful tiny useful computer.

  • Enter Slide 2 Title Here

  • Enter Slide 3 Title Here

Wednesday, November 26, 2008

photofunia programming tricks

Photofunia Programming Tricks
Image manipulation have lots of ways..
To make it realistic just using PHP is not a very hard way..

Firstly, list out what you can do with the PHP photo manipulation function..
1. stretch vertically/ horizontally
2. rotate picture
3. skew horizontally / vertically
4. reposition x and y

Secondly, develop the code.. below is some of the example for each function i have made..


coming up next... Code for creating special effects on a picture with php

Photofunia functionality

Photofunia functionality

The secrets remains inside....
Recently developing a web application which have the same function of photofunia.com and besides using PHP, photofunia use ImageMagick to stretch photo which makes the photo looks more realistic in a photo. PHP till now still don't have a lots of support for graphic stretching using gd. A driver called imageMagick which can be downloaded must be installed into the server computer in order to use it as the machine to stretch photo. ImageMagick supports for few types of language such as PHP, C, .Net, python, Pascal, perl and so on.

Get ImageMagick for free.. under GPL.

Read more about Magick Wand for PHP at MagickWand for PHP manual


Upload files php script

Upload files PHP script

Photofunia

PhotoFunia

Create your own advertisement board picture, your picture on a celebrity shirts, your picture on a glass and so on..

The magnificent of using computer automate the merge of picture and also mixture of special effects makes your photo looks real and unbelievable.

Here's some of their photo which you insert your photo in it!!!

Thursday, November 20, 2008

The Recrusive downline Code

Recently developing a affiliate programe and this code will help us to list out the downline user list from database..

From the code, it start looping few time function to list down the downline into an array and then from that array, we can extract out the listing accordingly.

function recrusive_downline($directory, $downnumber=2)
{
$list = vertline($directory);
$deep = $downnumber-1;
while(list($index, $file) = each($list))
{
if($downnumber > "0")
{

if(count(vertline($file))<>0)
{
if($deep >0)
{
$directory_tree[] = array(
'deep' => $downnumber,
'path' => $file,
'content' => recrusive_downline($file, $deep)
);
}else{
$directory_tree[] = array(
'deep' => $downnumber,
'path' => $file
);
}
}else
{
$directory_tree[] = array(
'deep' => $downnumber,
'path' => $file
);
}
}
}
return $directory_tree;
}