| line |
true |
false |
branch |
|
43
|
43 |
86 |
unless "PDL::Type"->new($type)->unsigned |
|
89
|
0 |
43 |
if not @_ or @_ > 3 |
|
91
|
0 |
43 |
ref $_[1] && UNIVERSAL::isa($_[1], 'PDL') ? : |
|
96
|
27 |
16 |
if (ref $file) { } |
|
99
|
0 |
16 |
unless open $fh, $file |
|
104
|
0 |
43 |
unless $magic =~ /P([1-6])/ |
|
106
|
0 |
43 |
if $PDL::debug > 1 |
|
108
|
27 |
16 |
$magicno > 3 ? : |
|
111
|
12 |
31 |
$ispbm ? : |
|
|
12 |
31 |
$ispbm ? : |
|
116
|
43 |
74 |
if $line =~ /^\s*$/ |
|
118
|
117 |
0 |
if ($line =~ /\s*(\S+)(.*)$/) { } |
|
125
|
0 |
43 |
if $pgot < $params |
|
126
|
0 |
43 |
if $dims[0] <= 0 or $dims[1] <= 0 |
|
129
|
0 |
43 |
unless defined $type |
|
132
|
6 |
37 |
if $isrgb |
|
133
|
6 |
37 |
if $pdl->isnull and $isrgb |
|
135
|
6 |
37 |
$isrgb ? : |
|
136
|
27 |
16 |
if ($israw) { } |
|
143
|
0 |
0 |
$isrgb ? : |
|
|
0 |
0 |
$israw ? : |
|
|
0 |
43 |
if $PDL::debug |
|
148
|
27 |
16 |
if not isbigendian() and $israw |
|
180
|
0 |
37 |
if $#_ < 2 |
|
183
|
0 |
37 |
unless exists $type2base{$type} |
|
192
|
0 |
2 |
if $type =~ /PPM/ and $#Dims != 2 || $Dims[0] != 3 |
|
194
|
0 |
37 |
if $type =~ /P[GB]M/ and $#Dims != 1 |
|
196
|
0 |
37 |
unless $pdl->type->integer |
|
199
|
0 |
37 |
if $pdl->min < 0 or $max > 65535 |
|
203
|
21 |
0 |
$pdl->get_datatype == $PDL::IO::Pnm::PDL_B || $pdl->get_datatype == $PDL::IO::Pnm::PDL_US || $type eq 'PBM' ? : |
|
|
16 |
21 |
defined $raw && !$raw ? : |
|
211
|
32 |
5 |
!($file =~ /^\s*[|>]/) ? : |
|
213
|
16 |
21 |
if (ref $file) { } |
|
216
|
0 |
21 |
unless open $fh, $pref . $file |
|
220
|
0 |
0 |
$israw ? : |
|
|
0 |
37 |
if $PDL::debug |
|
225
|
25 |
12 |
if ($type ne "PBM") |
|
227
|
13 |
12 |
if ($max < 256) { } |
|
|
12 |
0 |
elsif ($max < 65536) { } |
|
238
|
2 |
35 |
$isrgb ? : |
|
241
|
21 |
16 |
if (not isbigendian() and $israw) |
|
242
|
21 |
0 |
unless $swap_inplace |
|
247
|
0 |
37 |
if not $already_open || close $fh |