I don't know if this is possible with php, but i am trying to set the background of a site to a series of randomly placed, random images of the same size.

What i am curious about is whether there is a way to take a handful of images and block them together to create a new single image?

If this is not possible, does anyone know of another way to accomplish this?

could u describe the more thing about your problem so daniweb can help u?

I'm looking to take a group of images that are the same size. Lets say 4 images for simplicities sake. I want to block them together to create one single image. It would take image 1 and 2 and join them together besides each other. Take 3 and 4 and do the same. Then from those 2 images it creates, combine them one on top of the other.

In reality i am looking to do this with anywhere from 16 to 32 images.

could u describe the more thing about your problem so daniweb can help u?

Member Avatar for diafol

Does it have to be a single image? A table could arrange them. A graphics package with stitch them together. If you've got an underlying grid- this is a snip. Just upload the image. If you want to do this dynamically, have a look at the GD2 graphics library. It should ship with your version of php. Note - this will be sloooow for 32 images.
However, if you want to do it as a routine - you could set up a cron job (e.g. to run at midnight every night) to create new backgrounds.

Does it have to be a single image? A table could arrange them. A graphics package with stitch them together. If you've got an underlying grid- this is a snip. Just upload the image. If you want to do this dynamically, have a look at the GD2 graphics library. It should ship with your version of php. Note - this will be sloooow for 32 images.
However, if you want to do it as a routine - you could set up a cron job (e.g. to run at midnight every night) to create new backgrounds.

*nosebleed*

I may try the table idea. I beleive i've seen this done in the past.

The 16 or 32 images would be a smaller 200x200 roughly and be resized to make up the background. Normally if this was static, i would just use PS and make a background. However, I am looking to have these images picked at random from a few hundred or have a fix set of 16/32 and have the script rearrange their order

Does it have to be a single image? A table could arrange them. A graphics package with stitch them together. If you've got an underlying grid- this is a snip. Just upload the image. If you want to do this dynamically, have a look at the GD2 graphics library. It should ship with your version of php. Note - this will be sloooow for 32 images.
However, if you want to do it as a routine - you could set up a cron job (e.g. to run at midnight every night) to create new backgrounds.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.