html and images
Is there a way to write a html page that contains all jpg files in its own directory without knowing the names of the files? It doesn''t have to look pretty, just show the pictures. I know a little html, and I could include a known image.
OK, can I create a thumbnail image without saving a separate resized file? If so, how could I display an image at a % of its size?
Yes but it will take as long to download as it does without using width and height.
Colin Jeanne | Invader''s Realm
Colin Jeanne | Invader''s Realm
I think I know what you mean; what you're going to have to do is do that through something like PHP, ASP, etc ..
What you would have to do is create a file stream object and run a loop on folder contents, only pulling back jpg's (There should be an option to return the extention of a file. then just either response.write() it or echo ""; it with the img tags.
Other then that, html won't give you what you need; html is just fancy layout code for web browsing.
I believe you can use
[edited by - PumpkinPieman on November 29, 2003 3:15:20 PM]
What you would have to do is create a file stream object and run a loop on folder contents, only pulling back jpg's (There should be an option to return the extention of a file. then just either response.write() it or echo ""; it with the img tags.
Other then that, html won't give you what you need; html is just fancy layout code for web browsing.
quote:Original post by nagromo
OK, can I create a thumbnail image without saving a separate resized file? If so, how could I display an image at a % of its size?
I believe you can use
<img src='ImageName.gif' width='50%' height='50%' alt=''>
[edited by - PumpkinPieman on November 29, 2003 3:15:20 PM]
You'll need a server-side script or CGI program. Here's a quick ASP program I wrote:
[edited by - JNewt on November 29, 2003 4:16:09 PM]
<%Set FSO = CreateObject("Scripting.FileSystemObject")'find images Set f = FSO.GetFolder("C:\mywebsite\imgs\") Set fc = f.Files For Each f1 In fc If Right(f1.Name, 3) = "jpg" Then Response.Write "<img src='\imgs\" & f1.Name & "'>" End If Next%>[\source]
[edited by - JNewt on November 29, 2003 4:16:09 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement