[Templates] Image plugin won't retrieve size of SWF
[prev]
[thread]
[next]
[Date index for 2004/07/16]
I can get the size of a Flash movie with Image::Size, but not with the
Image plugin.
[% path= "../ult/html/loader.swf" %]
[% MACRO swfsize PERL %]
use Image::Size;
my $file = $stash->get('path');
my ($w, $h) = imgsize($file);
print qq/ width="$w" height="$h" /;
[% END # %]
[% swfsize() %] # prints width="800" height="600"
[% TRY;
USE image(path);
image.width;
CATCH;
error; # prints Image error - Unrecognized file
format
END
%]
I'm using ActiveState Perl w/ WinXP Pro. The plugin works ok on gifs and
jpgs. Image::Info is installed.
Bruce
--
Bruce McKenzie
Business Information Graphics, Inc.
242 W. 36th Street -- 10th Floor
New York, NY 10018
voice: 212-477-4288
http://2MinuteExplainer.com
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates
 |
[Templates] Image plugin won't retrieve size of SWF
Bruce McKenzie 15:48 on 16 Jul 2004
|