here is a little plugin i wrote that others may find useful.

it takes pathnames or Template::Plugin::Files as arguments and returns
a hash of attributes related to that image.  see the documentation for
the underlying module, Image::Info, for a list of supported formats.

if you use a digital camera, you can access a plethora of information
about the exposure time, aperature setting etc.

embedding comments into the images is a good way to create captions
without leaving heaps of metadata files laying around.

basic usage is like this:

[% USE dir = Directory('/home/hugh/tmp/images/') %]
[% USE file = File('/home/hugh/pix/JAPH.GIF') %]
[% USE images = Image.Info(dir.files,'/home/hugh/pix/NinePlanets.jpg',file) %]
[% FOREACH img = images %]
<img src="[% img.name %]"
     width="[% img.width %]" height="[% img.height %]"
     alt="IMAGE [% loop.count %]: [% img.Comment %]" />
[%# USE Dumper.dump(img) %]
[% END %]


Attachment: Info.pm
Description: XX::Template::Plugin::Image::Info

Reply via email to