Branch Coverage

blib/lib/PDF/Builder/Resource/XObject/Image/PNG.pm
Criterion Covered Total %
branch 22 68 32.3


line true false branch
107 0 3 if ref $class
110 0 3 unless $self->is_obj($pdf)
116 1 2 if (ref $file) { }
119 1 1 unless open $fh, '<', $file
131 2 6 if ($buf eq 'IHDR') { }
2 4 elsif ($buf eq 'PLTE') { }
2 2 elsif ($buf eq 'IDAT') { }
0 2 elsif ($buf eq 'tRNS') { }
2 0 elsif ($buf eq 'IEND') { }
134 0 2 if $cm
135 0 2 if $im
136 0 2 if $fm
160 0 2 if ($cs == 0) { }
0 2 elsif ($cs == 2) { }
2 0 elsif ($cs == 3) { }
0 0 elsif ($cs == 4) { }
0 0 elsif ($cs == 6) { }
163 0 0 if ($bpc > 8) { }
175 0 0 if (defined $trns and not $opts{'-notrans'})
183 0 0 if ($bpc > 8) { }
195 0 0 if (defined $trns and not $opts{'-notrans'})
218 0 2 if ($bpc > 8) { }
235 0 2 if (defined $trns and not $opts{'-notrans'})
270 0 0 if ($bpc > 8) { }
284 0 0 unless ($opts{'-notrans'})
316 0 0 if ($bpc > 8) { }
330 0 0 unless ($opts{'-notrans'})
403 0 0 if ($pa <= $pb and $pa <= $pc) { }
0 0 elsif ($pb <= $pc) { }
425 0 0 if ($filter == 0) { }
0 0 elsif ($filter == 1) { }
0 0 elsif ($filter == 2) { }
0 0 elsif ($filter == 3) { }
0 0 elsif ($filter == 4) { }