variable image size
Moderator: General Moderators
variable image size
I'd like to vary the size of an image on the welcome page of my website. The aim is to make the image the size that it fills the screen nicely. Is this possible using only one image?
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
Resize it to a size that will fit a resolution of 800 x 600.The aim is to make the image the size that it fills the screen nicely
That isn't strictly necessary in order to achieve your aim.I'd like to vary
You can do this with the image library (GD2) starting off with a function like createimagefromjpeg().Is this possible using only one image?
Ok, apparently I have to reformulate what I'm looking for....
At the moment I have the following: a 1024 x 723 pixel image. In my code I resize this to width='650'.
This way it fills my welcome page nicely on a 1024 x 768 monitor. However, this way the image size is fixed, regardless of the visitor's equipment. I'd prefer it if I could also acknowledge the 1600 x 1200 monitor users with a nice website...instead of something small in the corner of their screen they experience now when visiting my website.
For this reason, I'll ask it again: is there an option to use only the original image on my webdomain, but presenting the image on a size that fits the visitor's screen size?
In case words aren't enough, to give you an impression, the website I'm currently developing is at http://www.harmonieleek.nl.
At the moment I have the following: a 1024 x 723 pixel image. In my code I resize this to width='650'.
This way it fills my welcome page nicely on a 1024 x 768 monitor. However, this way the image size is fixed, regardless of the visitor's equipment. I'd prefer it if I could also acknowledge the 1600 x 1200 monitor users with a nice website...instead of something small in the corner of their screen they experience now when visiting my website.
For this reason, I'll ask it again: is there an option to use only the original image on my webdomain, but presenting the image on a size that fits the visitor's screen size?
In case words aren't enough, to give you an impression, the website I'm currently developing is at http://www.harmonieleek.nl.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
This cannot be solely done with PHP. Why? Because PHP has no native ability to know what resolution a user has. At minimum, Javascript would be required to read the screen dimensions and send that information to your scripts for adjustment. Other than not doing this idea, an alternative may be Flash or Java.