source: trunk/gsdl/perllib/cpan/auto/Image/Size/swfmxsize.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: 922 bytes
Line 
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 1120 "lib/Image/Size.pm (autosplit into blib/lib/auto/Image/Size/swfmxsize.al)"
7# swfmxsize: determine size of compressed ShockWave/Flash MX files. Adapted
8# from code sent by Victor Kuriashkin <[email protected]>
9sub swfmxsize
10{
11 require Compress::Zlib;
12
13 my ($image) = @_;
14 my $header = &$read_in($image, 1058);
15 my $ver = _bin2int(unpack 'B8', substr($header, 3, 1));
16
17 my ($d, $status) = Compress::Zlib::inflateInit();
18 $header = $d->inflate(substr($header, 8, 1024));
19
20 my $bs = unpack 'B133', substr($header, 0, 9);
21 my $bits = _bin2int(substr($bs, 0, 5));
22 my $x = int(_bin2int(substr($bs, 5+$bits, $bits))/20);
23 my $y = int(_bin2int(substr($bs, 5+$bits*3, $bits))/20);
24
25 return ($x, $y, 'CWS');
26}
27
281;
29# end of Image::Size::swfmxsize
Note: See TracBrowser for help on using the repository browser.