Re: Randomly rotate image on page load? File under: Image Manipulation
| From: | David Robley | Date: | Mon, 10 Jul 2006 07:08:51 +0000 |
| Subject: | Re: Randomly rotate image on page load? File under: Image Manipulation | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-239239@lists.php.net to get a copy of this message | ||
Chris wrote:
> Micky Hulse wrote:
>> Hi,
>>
>> I have not done much Googling yet... thought I would ask here before I
>> spend a bunch of time searching for some guidance... What would be the
>> best function set for on-the-fly image manipulation (specifically image
>> rotation?)
>>
>> Is it easily done? Possible? Worth the trouble?
>>
>> Any links and/or guidance would be appreciated (hopefully the answer is
>> not a blatantly obvious RTFM.) :)
>
> It is.
>
> http://www.php.net/image
>
> There's even a function to do the rotations for you
>
> http://www.php.net/manual/en/function.imagerotate.php
>
If you actually want to load a different image each time, start with
php.net/rand Perhaps the image names could be integer based, or you could
oad the image paths into an array and use rand to select based on a numeric
key. Or you could store the image paths in a mysql database and use mysql's
RAND to select an image path for display.
The possibilities are endless, but seeing this is a php list I won't mention
J...s....t :-)
Cheers
--
David Robley
Disc space - the final frontier!
Today is Sweetmorn, the 45th day of Confusion in the YOLD 3172.