![]() |
|
#1
|
|||
|
|||
Scaling ImagesGreetings once more,
I am uploading images to a database for viewing by those that will visit my website. I have various pages that will display these images, but in different sizes depending upon how they are being presented to the visitor. They might be displayed in a search page (thumbnail size), as a top ten (medium size), or as the main viewed item (large size.) I would like to be able to scale these images from one source, thus reducing the amount of files that have to be maintained. I have "Googled" this thought for the last couple of days, seen a bunch of websites with multiple possiblitles of how to do this. My question is what would be the best approach to doing this? Thanks, Richard |
|
#2
|
||||
|
||||
Re: Scaling ImagesSo you want to have just one image file, e.g. /images/myimage.gif, stored and then display it at different dimensions?
The first thing that comes to mind is to simply control this via the markup. e.g. HTML Code:
But stretching an image file to something larger than it is, is something you may not want to do. __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#3
|
|||
|
|||
Re: Scaling ImagesYour suggestion works just great. But now I have a new problem. I uploaded my images into the database, and found a simple script on the internet, modified the script to access the database, and viewed them. They look great. Just like I wanted.
This is the simple script I found: PHP Code:
My new problem is that I then attempted to use this simple script, tried to place some of it's code into my webpage to direct the output to certain specific areas of the webpage. But all I get is a lot of garbage code. Probably some type of binary output. This is the original code of the webpage (It origionally pulled from a file sitting in a directory on the server): PHP Code:
And I attempted to cut in this part of the code: PHP Code:
I placed this part of the code from the simple script into the topten.php file. This file access the database, to allow information to be pulled from it. Works just fine. PHP Code:
I know its probably a simply mistake, or something. Any help would be greatful. Thanks, Richard |
Recent GIDBlog
NARMY by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Question regarding the use of images | conus | AdSense Forum | 3 | 28-Dec-2006 07:38 |
| Grab multiple images and display on a web page | Saru | .NET Forum | 1 | 10-Mar-2006 15:35 |
| Downloading images | WaltP | Web Design Forum | 3 | 30-Jul-2005 19:28 |
| Fl_Help_View does not display images | jflisjak | FLTK Forum | 15 | 08-Jul-2005 05:37 |
| Why are my images distorted? | rhino1616 | Graphics Forum | 0 | 27-Jun-2003 09:30 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The