![]() Topic awaiting preservation: image viewer (Page 1 of 1) |
|
---|---|
Nervous Wreck (II) Inmate From: |
![]() What is a good way to make a page that views images? So far I already wrote perl script that looks in the folders 1 level deep of the current, and makes a webpage of thumbnails for each. Right now when you click on the thumbnail, it links to itself so you see the picture. But it's with the default white background. What's a better way? code: /fooa
|
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
![]() well, I ain't no perl programmer, but for 1), why don't you just output a link to the actual image file on the image on the thumbnail page. that way the browser will display just the image when someone clicks the thumbnail. |
Nervous Wreck (II) Inmate From: |
![]() quote: That's what i'm doing right now. I didn't do the second suggestion because I don't have a server installed. (That way if i put this on a cd it will still work) |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
![]() Question: How are you going to get the Perl to run if there is no server? |
Maniac (V) Inmate From: Brisbane, Australia |
![]() quote:
|
Nervous Wreck (II) Inmate From: |
![]() I know perl is serverside, i just explained my question wierd. I'll try again |
Paranoid (IV) Inmate From: Minneapolis, MN, USA |
![]() Well I don't know Perl well enough to write out actual code for you, but a recursive function should generally look like this: |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
![]() Yeah I did a bit of checking and there doesn't really seem to be a built in function for this so you will need to parse the files within a directory and fine which are directories and dig into those. |
Nervous Wreck (II) Inmate From: |
![]() I got it to work using File::Find. Now I just need to make thumbnails. I downloaded ImageMagick for that. |