html and images

Started by
5 comments, last by nagromo 20 years, 4 months ago
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.
Advertisement
I don''t think you can do this with just html. Try reserching PERL or PHP.
----------------------------------------------------"Plant a tree. Remove a Bush" -A bumper sticker I saw.
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
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.

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:

<%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]
7|-|3 p057 @b0v3 i5 c3/^7i|=i3|) 1337!100|< |=0/^ j||3|/|7
Thanks, that last one worked well

This topic is closed to new replies.

Advertisement