Technical Help & Discussion > Website Design & Programming

php advice needed

<< < (5/7) > >>

Rik:
Si. :)

Simon:
you called?

Rik:
Close.  ;D

sam:

--- Quote from: Clive on January 23, 2010, 09:59 ---Will you have to return to Arecibo again this year? 

--- End quote ---

hopefully, not sure though

sam:
I've been thinking about this problem a bit more...

How about this:

Have an array of the dimensions of the overall image.

Then when you add an image to the array change the values of the array to something say -9. Then you have an idea of what positions are used up.

Each time you add an new image find all values that aren't -9 then take the first x,y location that fits for the image input (I guess you'd need to also hunt down the first one that matches the same dimensions). As the loop is left add -9 to it.. and so on for new images. You could do the inverse to remove images.

Then have a final loop that prints out the html code of the images at the correct array positions.

I'd like to try and write the code too but I don't really have the time at the moment. I think the above would work but I'm not entirely sure.

You could possibly also produce the image on a on the fly with imagemagik. Just figure out ħow you would stick the images together in gimp and follow the same procedure...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version