Branch Coverage

blib/lib/PDLA/IO/Pic.pm
Criterion Covered Total %
branch 59 114 51.7


line true false branch
100 0 13 $^O =~ /MSWin/i ? :
105 0 117 if -x "$_/cjpeg" . $ext
106 0 117 if -x "$_/pnmtojpeg" . $ext
111 0 13 if $jpeg_conv eq 'pnmtojpeg'
123 0 13 if $jpeg_conv eq 'cjpeg'
142 117 26 if defined $PDLA::IO::Pic::converter{$key}{'get'}
145 117 26 if defined $PDLA::IO::Pic::converter{$key}{'put'}
147 13 130 if (defined $PDLA::IO::Pic::converter{$key}{'Prefilt'})
148 13 0 if $PDLA::IO::Pic::converter{$key}{'Prefilt'} =~ /^\s*(\S+)\s+/
149 0 13 if $PDLA::IO::Pic::converter{$key}{'Wok'}
154 0 0 if $PDLA::IO::Pic::debug and $PDLA::IO::Pic::biggrays
158 0 0 /GIF/ ? :
52 91 /GIF|RAST|IFF/ ? :
0 143 $PDLA::IO::Pic::biggrays ? :
165 0 234 $^O =~ /win32/i ? :
166 0 234 $^O =~ /win32/i ? :
167 26 1872 if -x "$_/$prog$exe" or $prog =~ /^NONE$/
175 13 0 if /^PNM$/
176 13 0 unless ($checked)
177 0 13 if $PDLA::IO::Pic::debug
183 0 0 unless my $tmp = 'IO::File'->new_tmpfile
188 0 0 unless open STDERR, '>&IN'
280 0 10 if $#_ < 0
285 0 10 if (ref $file) { }
293 3 7 if ref $hints
294 3 7 if (defined $hints->{'FORMAT'}) { }
298 0 3 unless exists $PDLA::IO::Pic::converter{$type} and not $PDLA::IO::Pic::converter{$type}{'get'} =~ /NA/
302 0 7 if $type =~ /UNKNOWN/
306 0 10 if (defined $PDLA::IO::Pic::converter{$type}{'referral'})
307 0 0 if (ref $PDLA::IO::Pic::converter{$type}{'referral'}{'get'} eq 'CODE') { }
315 10 0 unless defined $flags
316 0 10 if defined $hints->{'XTRAFLAGS'}
318 10 0 if $PDLA::IO::Pic::converter{$type}{'get'} =~ /^NONE/
320 2 8 if $PDLA::IO::Pic::debug > 10
461 0 8 if $#_ < 1
467 6 2 if ref $hints
471 0 8 if (defined $referral)
472 0 0 if (ref $referral->{'put'} eq 'CODE') { }
479 2 6 if $PDLA::IO::Pic::debug > 10
482 5 3 if (defined $hints->{'IFORM'}) { }
485 0 3 if $conv =~ /^\s*(ppm)|(cjpeg)/
486 0 3 if $conv =~ /^\s*pgm/
487 0 3 if $conv =~ /^\s*pbm/
488 3 0 if $conv =~ /^\s*(pnm)|(NONE)/
491 2 6 if $PDLA::IO::Pic::debug > 10
494 8 0 if $conv =~ /^NONE/
495 2 6 if $PDLA::IO::Pic::debug > 10
497 5 3 if defined $hints->{'IFORM'} and $hints->{'IFORM'} =~ /RAW/
498 0 8 if defined $hints->{'IFORM'} and $hints->{'IFORM'} =~ /ASCII/
570 1 1 if (@args >= 2 and UNIVERSAL::isa($args[0], 'PDLA'))
575 0 0 if ($out->ndims == 3 and $out->dim(0) == 3 and not defined $out->gethdr && $out->gethdr->{'SIMPLE'})
588 0 0 if ($out->ndims == 3 and $out->dim(0) == 3 and not defined $out->gethdr && $out->gethdr->{'SIMPLE'})
683 0 0 if $im->ndims == 3 and $im->dim(2) == 3 and not $args[1] =~ /\.fits$/i || ref $args[2] eq 'HASH' && $args[2]{'FORMAT'} =~ /fits/i
759 0 0 if $#_ != 1
765 0 0 unless (inpath('ffmpeg'))
773 0 0 if @Dims != 4 or $Dims[0] != 3 or $pdl->get_datatype != $PDLA::IO::Pic::PDLA_B
794 0 0 unless open MPEG, "| ffmpeg -f image2pipe -vcodec ppm -i - $file"