source: trunk/gsdl/perllib/cpan/auto/Image/Size/swfsize.al@ 13983

Last change on this file since 13983 was 13983, checked in by lh92, 17 years ago

Added for Realistic Book Project

  • Property svn:keywords set to Author Date Id Revision
File size: 760 bytes
RevLine 
[13983]1# NOTE: Derived from lib/Image/Size.pm.
2# Changes made here will be lost when autosplit is run again.
3# See AutoSplit.pm.
4package Image::Size;
5
6#line 1084 "lib/Image/Size.pm (autosplit into blib/lib/auto/Image/Size/swfsize.al)"
7# swfsize: determine size of ShockWave/Flash files. Adapted from code sent by
8# Dmitry Dorofeev <[email protected]>
9sub swfsize
10{
11 my $image = shift;
12 my $header = &$read_in($image, 33);
13
14 my $ver = _bin2int(unpack 'B8', substr($header, 3, 1));
15 my $bs = unpack 'B133', substr($header, 8, 17);
16 my $bits = _bin2int(substr($bs, 0, 5));
17 my $x = int(_bin2int(substr($bs, 5+$bits, $bits))/20);
18 my $y = int(_bin2int(substr($bs, 5+$bits*3, $bits))/20);
19
20 return ($x, $y, 'SWF');
21}
22
23# end of Image::Size::swfsize
241;
Note: See TracBrowser for help on using the repository browser.