Jump to content

Dynamically Expanding Image


Corrupter

Recommended Posts

Hey guys, love the site, found the manual to be quite informative and it even helped with another problem im having, but i fear what i want to do next is too advanced for my skill level so i thought i'd ask and see what i get.

 

I want to create an image that expands to the document size thats being displayed.

 

as it stands right now, i have a main php page that calls another php page inside it in limited size.  that page that is being called i want to have a background image so as the content in the called page fills the area it will also have the image filled in behind it.  now im not talking about one image just simply stretching, this is more like the window looks just like a window from the OS Windows, and i want the bottom to stretch down expanding the whitespace and the right side to stretch to the right.  there is whitespace in the middle for this to happen, i know its possible as forums use this sort of thing to stretch simple images to fit the screen.

 

i just couldnt find out how to do this.  Some possibly point me to the docs that would help me?

Link to comment
Share on other sites

the easiest way to achive this would be to have one image that is bigger than you need and simply set it as a background.

 

inorder to make an image as big as the screen you would need some javascript to report the screen size (an ajax request of some sort ) and maintain that databetween requests (a session or cookie) and serve a graphic based on that info.

 

IF you are going to use the latter method I would suggest you simply create a few images to serve as backgrouns rather than generating one dynamically - there is no-need to recreate an image each time and rathaer than cache the php generated image you may as well just create them.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.