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.<table border="0" cellpadding="4" cellspacing="1" bgcolor="#000000"> <TMPL_LOOP name="rowloop"> <tr bgcolor="#ffffff"> <td valign="top"> <TMPL_IF name="img1src"> <img src="/cgi-bin/thumbnail.pl?img=<TMPL_VAR name="img1src">"> </TMPL_IF> </td> <td valign="top"> <TMPL_IF name="img2src"> <img src="/cgi-bin/thumbnail.pl?img=<TMPL_VAR name="img2src">"> </TMPL_IF> </td> <td valign="top"> <TMPL_IF name="img3src"> <img src="/cgi-bin/thumbnail.pl?img=<TMPL_VAR name="img3src">"> </TMPL_IF> </td> <td valign="top"> <TMPL_IF name="img4src"> <img src="/cgi-bin/thumbnail.pl?img=<TMPL_VAR name="img4src">"> </TMPL_IF> </td> <td valign="top"> <TMPL_IF name="img5src"> <img src="/cgi-bin/thumbnail.pl?img=<TMPL_VAR name="img5src">"> </TMPL_IF> </td> </tr> </TMPL_LOOP> </table>
In reply to Re: reading all images in a directory
by injunjoel
in thread reading all images in a directory
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |