Syntactic Confectionery Delight | |
PerlMonks |
Re: reading all images in a directoryby injunjoel (Priest) |
on Jun 24, 2005 at 17:05 UTC ( [id://469769]=note: print w/replies, xml ) | Need Help?? |
Greetings, I would use HTML::Template to set up a table for image display, 5 per row, as many rows as needed. Something like As for resizing you could create a script that reads in a single image and outputs the resized version, like a thumbnail, You will need GD or Image::Magic for this. Then with your gallery script fill the HTML::Template with image tags that call the thumbnail script i.e. <image src="/cgi-bin/thumbnail.pl?img=foobar.jpg" /> That way you don't have to slurp the entire directory of images in, just their names. Update Fixed Template formatting for readability -InjunJoel
"I do not feel obliged to believe that the same God who endowed us with sense, reason and intellect has intended us to forego their use." -Galileo
In Section
Seekers of Perl Wisdom
|
|