hi all i need some help...
i have a folder of JPG's
i need a script that will get use all the images in the folder to make one image. it also needs to muddle up the images so that the final image made is all mixed up with all the images that were in the folder.
then i need this to display on a web page.
im a total newbie to php so any help would be most helpful
:)
Jasber
01-29-2004, 02:28 PM
While you could get someone to do it for you (:)) what's the fun in that?
I've never done anything quite like this before, but I have a good general knowledge of the image functions in php, so if you run into any problems, you can come back and post here or contact me by other means.
http://php.us.themoes.org/manual/en/function.imagecopy.php
Read all of the user comments there, they are really good.
And perhaps
http://php.us.themoes.org/manual/en/function.imagecopymerge.php
Good luck.
ok thanks :) im sure ill be in touch
ok ive been dabbling and have so far managed to have a script that looks at all the iumages in the folder and adds tehm to an array asi think that how ill have to add them togther next.
here is my code for this:
<html>
<head>
<title>Random Image</title>
</head>
<body>
<?php
$images_directory = "photos";
if ($handle = opendir($images_directory)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$images[] = $file;
}
}
closedir($handle);
}
/*
All of the files in that directory are now in the array $images[]
next is to display a random image
*/
$image = $images[mt_rand(0, count($images)-1)];
?>
<div align=center>
<img src="photos/<? echo $image?>" border=0 alt="Random!">
</div>
</body>
</html>
how do i now add all the images to one canvas?