sub _unpack_JPEG { my ($self, $stream, $len) = @_; my ($data1, $data2);
while (!$data2 and $len > 0) { my $size = ($len > 1000) ? 1000 : $len; $data1 = $stream->get_string($size); $len -= $size; if ($data1 =~/\xff$/ and $len>0) { $data1 .= $stream->get_string(1); $len--; } ($data1, $data2) = split /\xff\xd9/, $data1; $self->BitmapJPEGEncoding->add($data1); } $self->BitmapJPEGEncoding->add("\xff\xd9"); $self->BitmapJPEGImage($data2); while ($len > 0) { my $size = ($len > 1000) ? 1000 : $len; $data1 = $stream->get_string($size); $len -= $size; $self->BitmapJPEGImage->add($data1); } }
sub unpack { my ($self, $stream, $flags)=@_;
$self->FontID ->unpack($stream) if ($flags & 8); $self->TextColor->unpack($stream) if ($flags & 4); $self->XOffset($stream->get_SI16) if ($flags & 1); $self->YOffset($stream->get_SI16) if ($flags & 2); $self->TextHeight($stream->get_UI16) if ($flags & 8); }
SWF::Element - Classes of SWF tags and elements. See Element.pod for further information.
Copyright 2000 Yasuhiro Sasama (ySas), <ysas@nmt.ne.jp>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install SWF::File, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SWF::File
CPAN shell
perl -MCPAN -e shell install SWF::File
For more information on module installation, please visit the detailed CPAN module installation guide.