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:
927 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.
|
---|
4 | package Image::Size;
|
---|
5 |
|
---|
6 | #line 1100 "lib/Image/Size.pm (autosplit into blib/lib/auto/Image/Size/pcdsize.al)"
|
---|
7 | # Suggested by Matt Mueller <[email protected]>, and based on a piece of
|
---|
8 | # sample Perl code by a currently-unknown author. Credit will be placed here
|
---|
9 | # once the name is determined.
|
---|
10 | sub pcdsize
|
---|
11 | {
|
---|
12 | my $stream = shift;
|
---|
13 |
|
---|
14 | my ($x, $y, $id) = (undef, undef, "Unable to determine size of PCD data");
|
---|
15 | my $buffer = &$read_in($stream, 0xf00);
|
---|
16 |
|
---|
17 | # Second-tier sanity check
|
---|
18 | return ($x, $y, $id) unless (substr($buffer, 0x800, 3) eq 'PCD');
|
---|
19 |
|
---|
20 | my $orient = ord(substr($buffer, 0x0e02, 1)) & 1; # Clear down to one bit
|
---|
21 | ($x, $y) = @{$Image::Size::PCD_MAP{lc $Image::Size::PCD_SCALE}}
|
---|
22 | [($orient ? (0, 1) : (1, 0))];
|
---|
23 |
|
---|
24 | return ($x, $y, 'PCD');
|
---|
25 | }
|
---|
26 |
|
---|
27 | # end of Image::Size::pcdsize
|
---|
28 | 1;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.