Branch Coverage

blib/lib/PDF/Builder/Resource/XObject/Image/PNG.pm
Criterion Covered Total %
branch 44 78 56.4


line true false branch
111 0 5 if (defined $opts{'-nouseIPL'} and not defined $opts{'nouseIPL'})
112 0 5 if (defined $opts{'-notrans'} and not defined $opts{'notrans'})
113 0 5 if (defined $opts{'-name'} and not defined $opts{'name'})
114 0 5 if (defined $opts{'-compress'} and not defined $opts{'compress'})
117 0 5 if (exists $opts{'name'})
122 0 5 if ref $class
125 0 5 unless $self->is_obj($pdf)
131 1 4 if (ref $file) { }
134 1 3 unless open $fh, "<", $file
146 4 14 if ($buf eq 'IHDR') { }
2 12 elsif ($buf eq 'PLTE') { }
4 8 elsif ($buf eq 'IDAT') { }
0 8 elsif ($buf eq 'tRNS') { }
4 4 elsif ($buf eq 'IEND') { }
149 0 4 if $cm
150 0 4 if $im
151 0 4 if $fm
175 0 4 if ($cs == 0) { }
0 4 elsif ($cs == 2) { }
2 2 elsif ($cs == 3) { }
0 2 elsif ($cs == 4) { }
2 0 elsif ($cs == 6) { }
178 0 0 if ($bpc > 8) { }
190 0 0 if (defined $trns and not $opts{'notrans'})
198 0 0 if ($bpc > 8) { }
210 0 0 if (defined $trns and not $opts{'notrans'})
233 0 2 if ($bpc > 8) { }
250 0 2 if (defined $trns and not $opts{'notrans'})
285 0 0 if ($bpc > 8) { }
299 0 0 unless ($opts{'notrans'})
331 0 2 if ($bpc > 8) { }
345 2 0 unless ($opts{'notrans'})
418 82304 11936 if ($pa <= $pb and $pa <= $pc) { }
11154 782 elsif ($pb <= $pc) { }
440 0 574 if ($filter == 0) { }
18 556 elsif ($filter == 1) { }
494 62 elsif ($filter == 2) { }
0 62 elsif ($filter == 3) { }
62 0 elsif ($filter == 4) { }