line |
true |
false |
branch |
149
|
0 |
58 |
if ($ex_version < "5.57") |
253
|
2 |
43 |
unless &i_conv($hsh{'image'}, $hsh{'coef'}) |
281
|
0 |
3 |
unless my $new_color = _color($color) |
288
|
0 |
1 |
unless &i_nearest_color($hsh{'image'}, $hsh{'xo'}, $hsh{'yo'}, \@colors, $hsh{'dist'}) |
338
|
0 |
3 |
unless my $new_color = _color($old) |
428
|
0 |
9 |
unless &i_fountain($hsh{'image'}, $hsh{'xa'}, $hsh{'ya'}, $hsh{'xb'}, $hsh{'yb'}, $hsh{'ftype'}, $hsh{'repeat'}, $hsh{'combine'}, $hsh{'super_sample'}, $hsh{'ssample_param'}, \@segments) |
458
|
0 |
34 |
if ($_[$i] eq '-log-stderr') { } |
477
|
0 |
8 |
if (exists $parms{'warn_obsolete'}) |
481
|
8 |
0 |
if ($parms{'log'}) |
483
|
0 |
8 |
unless "Imager"->open_log("log", $parms{'log'}, "level", $parms{'loglevel'}) |
486
|
0 |
8 |
if (exists $parms{'t1log'}) |
487
|
0 |
0 |
if ($formats{'t1'}) |
488
|
0 |
0 |
if (Imager::Font::T1::i_init_t1($parms{'t1log'})) |
506
|
0 |
34 |
unless ($is_logging) |
524
|
1 |
34 |
unless defined $level |
535
|
0 |
58 |
if ($DEBUG) |
551
|
0 |
0 |
if ($^O eq "android") |
557
|
0 |
0 |
unless (defined $DSO_handle) |
559
|
0 |
0 |
if ($DEBUG) |
561
|
0 |
0 |
if ($filters{$_}) |
567
|
0 |
0 |
if $DEBUG |
569
|
0 |
0 |
if $@ |
579
|
0 |
0 |
if ($^O eq "android") |
584
|
0 |
0 |
unless ($DSOs{$filename}) |
588
|
0 |
0 |
if $DEBUG |
591
|
0 |
0 |
unless (defined $rc) |
617
|
659 |
364 |
if (ref $arg) { } |
618
|
520 |
139 |
if (UNIVERSAL::isa($arg, 'Imager::Color') or UNIVERSAL::isa($arg, 'Imager::Color::Float')) { } |
623
|
3 |
136 |
if ($copy =~ /^HASH\(/) { } |
|
136 |
0 |
elsif ($copy =~ /^ARRAY\(/) { } |
645
|
55 |
68 |
if (not defined $combine and ref $self) |
648
|
91 |
32 |
unless defined $combine |
649
|
91 |
32 |
unless defined $combine |
651
|
85 |
38 |
if (exists $combine_types{$combine}) |
661
|
0 |
8601 |
unless ref $self |
664
|
8533 |
68 |
if $self->{'IMG'} and &Scalar::Util::blessed($self->{'IMG'}) |
666
|
0 |
68 |
$self->{'IMG'} ? : |
667
|
68 |
0 |
if $method |
676
|
75 |
87 |
if defined $_ |
697
|
0 |
1272 |
if $self->{'DEBUG'} |
698
|
14 |
1258 |
if (defined $hsh{'file'} or defined $hsh{'fh'} or defined $hsh{'fd'} or defined $hsh{'callback'} or defined $hsh{'readcb'} or defined $hsh{'data'} or defined $hsh{'io'}) { } |
|
554 |
704 |
elsif (defined $hsh{'xsize'} or defined $hsh{'ysize'}) { } |
|
0 |
704 |
elsif (%hsh) { } |
710
|
6 |
8 |
if ($hsh{'filetype'}) |
713
|
5 |
9 |
unless ($self->read(%hsh, %extras)) |
719
|
25 |
529 |
unless ($self->img_set(%hsh)) |
738
|
1 |
216 |
unless $self->_valid_image("copy") |
741
|
1 |
215 |
unless (defined wantarray) |
757
|
1 |
28 |
unless $self->_valid_image("paste") |
762
|
1 |
27 |
unless ($src) |
766
|
1 |
26 |
unless ($src->_valid_image("paste")) |
770
|
1 |
25 |
if $input{'left'} <= 0 |
771
|
1 |
25 |
if $input{'top'} <= 0 |
776
|
1 |
25 |
if ($input{'src_coords'}) { } |
780
|
2 |
23 |
if (defined $input{'src_maxx'}) { } |
|
1 |
22 |
elsif (defined $input{'width'}) { } |
784
|
0 |
1 |
if ($input{'width'} <= 0) |
793
|
3 |
22 |
if (defined $input{'src_maxy'}) { } |
|
1 |
21 |
elsif (defined $input{'height'}) { } |
797
|
0 |
1 |
if ($input{'height'} < 0) |
808
|
0 |
26 |
if $src_right > $r |
809
|
0 |
26 |
if $src_bottom > $b |
811
|
0 |
26 |
if ($src_right <= $src_left or $src_bottom < $src_top) |
829
|
1 |
46 |
unless $self->_valid_image("crop") |
832
|
1 |
45 |
unless (defined wantarray) |
844
|
33 |
12 |
if (defined $l) { } |
|
3 |
9 |
elsif (defined $r) { } |
|
1 |
8 |
elsif (defined $w) { } |
845
|
1 |
32 |
if (defined $w) { } |
|
1 |
31 |
elsif (not defined $r) { } |
853
|
2 |
1 |
if (defined $w) { } |
868
|
35 |
10 |
if (defined $t) { } |
|
3 |
7 |
elsif (defined $b) { } |
|
1 |
6 |
elsif (defined $h) { } |
869
|
4 |
31 |
if (defined $h) { } |
|
1 |
30 |
elsif (not defined $b) { } |
877
|
2 |
1 |
if (defined $h) { } |
893
|
0 |
45 |
if $l > $r |
894
|
0 |
45 |
if $t > $b |
896
|
1 |
44 |
if $l < 0 |
897
|
2 |
43 |
if $r > $self->getwidth |
898
|
1 |
44 |
if $t < 0 |
899
|
3 |
42 |
if $b > $self->getheight |
901
|
2 |
43 |
if ($l == $r or $t == $b) |
905
|
2 |
41 |
if ($r < $l or $b < $t) |
920
|
0 |
12 |
unless $self->_valid_image($name) |
927
|
12 |
0 |
unless defined $tolerance |
929
|
0 |
12 |
if (keys %hsh) |
934
|
5 |
7 |
if ($auto) |
935
|
0 |
5 |
if ($colors != $empty_trim_colors) |
939
|
0 |
5 |
if ($tolerance < 0) |
951
|
0 |
5 |
unless ($colors) |
957
|
0 |
12 |
unless (ref $colors) |
961
|
5 |
7 |
unless (UNIVERSAL::isa($colors, "Imager::TrimColorList")) |
962
|
0 |
5 |
unless (&Scalar::Util::reftype($colors) eq "ARRAY") |
981
|
0 |
4 |
unless my($left, $top, $right, $bottom) = $self->_trim_rect("trim", %hsh) |
984
|
0 |
4 |
if ($left == $self->getwidth) { } |
999
|
0 |
41 |
unless $self->_valid_image |
1007
|
41 |
0 |
if ($channels == $self->getchannels) { } |
1013
|
0 |
41 |
unless ($out->{'IMG'}) |
1039
|
4 |
550 |
if ($hsh{'model'}) |
1040
|
4 |
0 |
if (my $channels = $model_channels{$hsh{'model'}}) { } |
1049
|
25 |
529 |
if ($hsh{'type'} eq 'paletted' or $hsh{'type'} eq 'pseudo') { } |
|
70 |
459 |
elsif ($hsh{'bits'} eq 'double') { } |
|
22 |
437 |
elsif ($hsh{'bits'} == 16) { } |
1064
|
25 |
529 |
unless ($self->{'IMG'}) |
1076
|
1 |
9 |
unless $self->_valid_image("masked") |
1084
|
3 |
6 |
$opts{'mask'} ? : |
1090
|
1 |
8 |
unless ($result->{'IMG'}) |
1106
|
13 |
1 |
if (@_ != 1 and not ref $_[0]) { } |
1113
|
1 |
13 |
unless (defined wantarray) |
1119
|
1 |
12 |
unless $self->_valid_image("to_paletted") |
1123
|
2 |
10 |
unless ($result->{'IMG'} = &i_img_to_pal($self->{'IMG'}, $opts)) |
1134
|
1 |
6 |
unless (@images) |
1140
|
1 |
6 |
unless ($img->{'IMG'}) |
1148
|
1 |
4 |
unless (@cols) |
1159
|
1 |
2 |
unless (defined wantarray) |
1165
|
1 |
1 |
unless $self->_valid_image("to_rgb8") |
1169
|
0 |
1 |
unless ($result->{'IMG'} = &i_img_to_rgb($self->{'IMG'})) |
1181
|
0 |
8 |
unless (defined wantarray) |
1187
|
1 |
7 |
unless $self->_valid_image("to_rgb16") |
1191
|
0 |
7 |
unless ($result->{'IMG'} = &i_img_to_rgb16($self->{'IMG'})) |
1203
|
0 |
3 |
unless (defined wantarray) |
1209
|
1 |
2 |
unless $self->_valid_image("to_rgb_double") |
1213
|
0 |
2 |
unless ($result->{'IMG'} = &i_img_to_drgb($self->{'IMG'})) |
1225
|
1 |
23 |
unless $self->_valid_image("addcolors") |
1228
|
0 |
23 |
unless my(@colors) = @{$opts{'colors'};} |
1233
|
1 |
48 |
unless ($color) |
1246
|
1 |
11 |
unless $self->_valid_image("setcolors") |
1249
|
1 |
10 |
unless my(@colors) = @{$opts{'colors'};} |
1254
|
1 |
13 |
unless ($color) |
1267
|
1 |
14 |
unless $self->_valid_image("getcolors") |
1270
|
9 |
5 |
if (not exists $opts{'start'} || exists $opts{'count'}) { } |
|
5 |
0 |
elsif (not exists $opts{'count'}) { } |
|
0 |
0 |
elsif (not exists $opts{'start'}) { } |
1288
|
1 |
14 |
unless $self->_valid_image("colorcount") |
1297
|
1 |
2 |
unless $self->_valid_image("maxcolors") |
1307
|
1 |
8 |
unless $self->_valid_image("findcolor") |
1310
|
0 |
8 |
unless ($opts{'color'}) |
1316
|
0 |
8 |
unless my $color = _color($opts{'color'}) |
1324
|
1 |
52 |
unless $self->_valid_image("bits") |
1328
|
12 |
40 |
if ($bits and $bits == 64) |
1337
|
1 |
56 |
unless $self->_valid_image("type") |
1340
|
30 |
26 |
&i_img_type($self->{'IMG'}) ? : |
1346
|
1 |
1 |
unless $self->_valid_image("virtual") |
1355
|
1 |
24 |
unless $self->_valid_image("is_bilevel") |
1364
|
1 |
85 |
unless $self->_valid_image("tags") |
1367
|
85 |
0 |
if (defined $opts{'name'}) { } |
|
0 |
0 |
elsif (defined $opts{'code'}) { } |
1375
|
5 |
80 |
wantarray ? : |
1388
|
0 |
0 |
if (wantarray) { } |
1401
|
1 |
22 |
unless $self->_valid_image("addtag") |
1404
|
20 |
2 |
if ($opts{'name'}) { } |
|
2 |
0 |
elsif ($opts{'code'}) { } |
1405
|
20 |
0 |
if (defined $opts{'value'}) { } |
|
0 |
0 |
elsif (defined $opts{'data'}) { } |
1406
|
17 |
3 |
if ($opts{'value'} =~ /^\d+$/) { } |
1425
|
2 |
0 |
if (defined $opts{'value'}) { } |
|
0 |
0 |
elsif (defined $opts{'data'}) { } |
1426
|
2 |
0 |
if ($opts{'value'} =~ /^\d+$/) { } |
1452
|
1 |
20 |
unless $self->_valid_image("deltag") |
1455
|
0 |
20 |
if (defined $opts{'index'}) { } |
|
20 |
0 |
elsif (defined $opts{'name'}) { } |
|
0 |
0 |
elsif (defined $opts{'code'}) { } |
1474
|
1 |
22 |
unless $self->_valid_image("settag") |
1477
|
20 |
2 |
if ($opts{'name'}) { } |
|
2 |
0 |
elsif (defined $opts{'code'}) { } |
1484
|
2 |
0 |
if (defined $opts{'value'}) { } |
|
0 |
0 |
elsif (defined $opts{'data'}) { } |
1485
|
2 |
0 |
if ($opts{'value'} =~ /^\d+$/) { } |
1511
|
0 |
226 |
if ($input->{'io'}) { } |
|
4 |
222 |
elsif ($input->{'fd'}) { } |
|
11 |
211 |
elsif ($input->{'fh'}) { } |
|
140 |
71 |
elsif ($input->{'file'}) { } |
|
63 |
8 |
elsif ($input->{'data'}) { } |
|
8 |
0 |
elsif ($input->{'callback'} or $input->{'readcb'}) { } |
1518
|
0 |
11 |
unless (&Scalar::Util::openhandle($input->{'fh'})) |
1526
|
0 |
140 |
unless (CORE::open $file, "<", $input->{'file'}) |
1537
|
0 |
8 |
unless ($input->{'seekcb'}) |
1540
|
0 |
8 |
if ($input->{'maxbuffer'}) { } |
1561
|
1 |
167 |
exists $input->{'buffered'} ? : |
1565
|
19 |
149 |
if ($input->{'io'}) { } |
|
0 |
149 |
elsif ($input->{'fd'}) { } |
|
6 |
143 |
elsif ($input->{'fh'}) { } |
|
113 |
30 |
elsif ($input->{'file'}) { } |
|
20 |
10 |
elsif ($input->{'data'}) { } |
|
10 |
0 |
elsif ($input->{'callback'} or $input->{'writecb'}) { } |
1572
|
0 |
6 |
unless (&Scalar::Util::openhandle($input->{'fh'})) |
1580
|
0 |
113 |
unless (CORE::open $fh, "+>", $input->{'file'}) |
1584
|
0 |
113 |
unless binmode $fh |
1592
|
4 |
6 |
if ($input->{'maxbuffer'} and $input->{'maxbuffer'} == 1) |
1604
|
5 |
163 |
unless ($buffered) |
1624
|
0 |
1 |
unless (&i_add_file_magic($name, $bits, $mask)) |
1638
|
22 |
199 |
if (defined $self->{'IMG'}) |
1645
|
0 |
221 |
unless my($IO, $fh) = $self->_get_reader_io(\%input) |
1648
|
116 |
105 |
unless ($type) |
1652
|
1 |
220 |
if ($input{'file'} and not $type) |
1657
|
2 |
219 |
unless ($type) |
1659
|
1 |
1 |
if $input{'file'} |
1666
|
0 |
0 |
if ($readers{$type} and $readers{$type}{'single'}) |
1670
|
6 |
213 |
unless ($formats_low{$type}) |
1677
|
194 |
19 |
unless defined $allow_incomplete |
1679
|
75 |
138 |
if ($type eq "pnm") |
1681
|
20 |
55 |
unless (defined $self->{'IMG'}) |
1685
|
0 |
55 |
if $self->{'DEBUG'} |
1689
|
98 |
40 |
if ($type eq "bmp") |
1691
|
46 |
52 |
unless (defined $self->{'IMG'}) |
1695
|
0 |
52 |
if $self->{'DEBUG'} |
1698
|
22 |
70 |
if ($type eq "tga") |
1700
|
4 |
18 |
unless (defined $self->{'IMG'}) |
1704
|
0 |
18 |
if $self->{'DEBUG'} |
1707
|
18 |
70 |
if ($type eq "raw") |
1708
|
0 |
18 |
unless ($input{'xsize'} and $input{'ysize'}) |
1714
|
1 |
17 |
unless (defined $interleave) |
1728
|
4 |
14 |
unless (defined $self->{'IMG'}) |
1732
|
0 |
14 |
if $self->{'DEBUG'} |
1742
|
0 |
3 |
unless defined $opts{'type'} |
1747
|
0 |
3 |
unless defined $opts{'single'} or defined $opts{'multiple'} |
1750
|
3 |
0 |
if ($opts{'single'}) |
1753
|
2 |
1 |
if ($opts{'multiple'}) |
1764
|
0 |
3 |
unless defined $opts{'type'} |
1769
|
0 |
3 |
unless defined $opts{'single'} or defined $opts{'multiple'} |
1772
|
3 |
0 |
if ($opts{'single'}) |
1775
|
2 |
1 |
if ($opts{'multiple'}) |
1809
|
22 |
83 |
if ($attempted_to_load{$file}) { } |
1810
|
22 |
0 |
if ($file_load_errors{$file}) { } |
1822
|
82 |
1 |
if $INC[-1] eq "." |
1827
|
0 |
83 |
if ($loaded) { } |
1847
|
214 |
8 |
if $formats_low{$type} or $readers{$type} |
1849
|
0 |
8 |
unless $type =~ /^\w+$/ |
1855
|
7 |
1 |
if (not $loaded and $error =~ /^Can't locate /) |
1858
|
7 |
0 |
if ($error =~ /^Can't locate /) |
1862
|
8 |
0 |
unless ($loaded) |
1871
|
168 |
8 |
if $formats_low{$type} or $writers{$type} |
1873
|
0 |
8 |
unless $type =~ /^\w+$/ |
1879
|
7 |
1 |
if (not $loaded and $error =~ /^Can't locate /) |
1882
|
7 |
0 |
if ($error =~ /^Can't locate /) |
1886
|
8 |
0 |
unless ($loaded) |
1900
|
0 |
0 |
if defined $y |
1922
|
0 |
3320 |
if ($obsolete_opts{$opt}) |
1925
|
0 |
0 |
if (ref $new) { } |
1933
|
0 |
0 |
if $warn_obsolete and $^W |
1935
|
3301 |
19 |
unless $tagname =~ /^\Q$prefix\E/ |
1937
|
3 |
16 |
if ($color_opts{$opt}) |
1939
|
0 |
3 |
unless ($value) |
1944
|
3 |
16 |
if (ref $value) { } |
1945
|
3 |
0 |
if (UNIVERSAL::isa($value, 'Imager::Color')) { } |
|
0 |
0 |
elsif (ref $value eq 'ARRAY') { } |
1954
|
0 |
0 |
if (ref $val) { } |
1955
|
0 |
0 |
if (UNIVERSAL::isa($val, 'Imager::Color')) { } |
1957
|
0 |
0 |
if $i < @imgs |
1967
|
0 |
0 |
if $i < @imgs |
2002
|
1 |
174 |
unless $self->_valid_image("write") |
2005
|
0 |
174 |
unless $self->_set_opts(\%input, "i_", $self) |
2009
|
99 |
0 |
if (not $type and $input{'file'}) |
2012
|
0 |
174 |
unless ($type) |
2020
|
0 |
174 |
if ($writers{$type} and $writers{$type}{'single'}) { } |
2021
|
0 |
0 |
unless ($IO, $fh) = $self->_get_writer_io(\%input) |
2024
|
0 |
0 |
unless $writers{$type}{'single'}->($self, $IO, %input, "type", $type) |
2028
|
6 |
168 |
unless ($formats_low{$type}) |
2034
|
0 |
168 |
unless ($IO, $fh) = $self->_get_writer_io(\%input, $type) |
2037
|
121 |
47 |
if ($type eq 'pnm') { } |
|
10 |
37 |
elsif ($type eq 'raw') { } |
|
21 |
16 |
elsif ($type eq 'bmp') { } |
|
16 |
0 |
elsif ($type eq 'tga') { } |
2038
|
0 |
121 |
unless $self->_set_opts(\%input, "pnm_", $self) |
2040
|
5 |
116 |
unless (&i_writeppm_wiol($self->{'IMG'}, $IO)) |
2044
|
0 |
116 |
if $self->{'DEBUG'} |
2047
|
0 |
10 |
unless $self->_set_opts(\%input, "raw_", $self) |
2049
|
4 |
6 |
unless (&i_writeraw_wiol($self->{'IMG'}, $IO)) |
2053
|
0 |
6 |
if $self->{'DEBUG'} |
2056
|
0 |
21 |
unless $self->_set_opts(\%input, "bmp_", $self) |
2058
|
12 |
9 |
unless (&i_writebmp_wiol($self->{'IMG'}, $IO)) |
2062
|
0 |
9 |
if $self->{'DEBUG'} |
2065
|
0 |
16 |
unless $self->_set_opts(\%input, "tga_", $self) |
2068
|
4 |
12 |
unless (&i_writetga_wiol($self->{'IMG'}, $IO, $input{'wierdpack'}, $input{'compress'}, $input{'idstring'})) |
2072
|
0 |
12 |
if $self->{'DEBUG'} |
2076
|
17 |
126 |
if (exists $input{'data'}) |
2078
|
0 |
17 |
unless ($data) |
2092
|
2 |
0 |
if (not $type and $opts->{'file'}) |
2095
|
0 |
5 |
unless ($type) |
2102
|
1 |
6 |
unless (ref $img and &Scalar::Util::blessed($img) and $img->isa("Imager")) |
2106
|
1 |
5 |
unless ($img->_valid_image("write_multi")) |
2112
|
0 |
2 |
unless $class->_set_opts($opts, "i_", @images) |
2119
|
0 |
2 |
if ($writers{$type} and $writers{$type}{'multiple'}) { } |
2120
|
0 |
0 |
unless ($IO, $file) = $class->_get_writer_io($opts, $type) |
2123
|
0 |
0 |
unless $writers{$type}{'multiple'}->($class, $IO, $opts, @images) |
2127
|
2 |
0 |
unless ($formats{$type}) |
2133
|
0 |
0 |
unless ($IO, $file) = $class->_get_writer_io($opts, $type) |
2139
|
0 |
0 |
if (@images == 1) { } |
2140
|
0 |
0 |
unless ($images[0]->write(%$opts, "io", $IO, "type", $type)) |
2151
|
0 |
0 |
if (exists $opts->{'data'}) |
2153
|
0 |
0 |
unless ($data) |
2166
|
0 |
5 |
unless my($IO, $file) = $class->_get_reader_io(\%opts, $opts{'type'}) |
2170
|
5 |
0 |
unless ($type) |
2174
|
1 |
4 |
if ($opts{'file'} and not $type) |
2179
|
2 |
3 |
unless ($type) |
2181
|
1 |
1 |
if $opts{'file'} |
2188
|
0 |
0 |
if ($readers{$type} and $readers{$type}{'multiple'}) |
2192
|
2 |
1 |
unless ($formats{$type}) |
2199
|
1 |
0 |
if ($type eq 'pnm') { } |
2204
|
0 |
0 |
if ($img->read(%opts, "io", $IO, "type", $type)) |
2211
|
0 |
1 |
unless (@imgs) |
2225
|
1117 |
158 |
if (defined $self->{'IMG'}) { } |
2245
|
1 |
85 |
unless $self->_valid_image("filter") |
2248
|
0 |
85 |
unless ($input{'type'}) |
2250
|
0 |
85 |
if (grep({$_ eq $input{'type'};} keys %filters) != 1) |
2254
|
10 |
75 |
if ($filters{$input{'type'}}{'names'}) |
2257
|
12 |
28 |
if (defined $input{$name} and exists $names->{$name}{$input{$name}}) |
2262
|
84 |
1 |
if (defined $filters{$input{'type'}}{'defaults'}) { } |
2276
|
0 |
290 |
unless (defined $hsh{$_}) |
2285
|
4 |
81 |
if ($@) |
2292
|
0 |
81 |
if $self->{'DEBUG'} |
2293
|
0 |
81 |
if $self->{'DEBUG'} |
2303
|
0 |
1 |
unless defined $hsh{'type'} |
2305
|
0 |
1 |
unless defined $hsh{'callsub'} |
2307
|
0 |
1 |
unless defined $hsh{'callseq'} |
2310
|
0 |
1 |
if exists $filters{$hsh{'type'}} |
2324
|
1 |
360 |
if (defined $opts{$name} and ref $opts{$name}) |
2333
|
58 |
2 |
if (ref $self) { } |
2334
|
58 |
0 |
unless defined $width |
2335
|
58 |
0 |
unless defined $height |
2338
|
1 |
1 |
unless (defined $width and defined $height) |
2344
|
8 |
51 |
if ($opts{'xscalefactor'} and $opts{'yscalefactor'}) { } |
|
3 |
48 |
elsif ($opts{'xscalefactor'}) { } |
|
3 |
45 |
elsif ($opts{'yscalefactor'}) { } |
2361
|
19 |
40 |
if ($opts{'xpixels'} and $opts{'ypixels'} and $opts{'type'}) { } |
|
6 |
34 |
elsif ($opts{'xpixels'}) { } |
|
3 |
31 |
elsif ($opts{'ypixels'}) { } |
|
0 |
31 |
elsif ($opts{'constrain'} and ref $opts{'constrain'} and $opts{'constrain'}->can('constrain')) { } |
2364
|
3 |
16 |
if ($opts{'type'} eq 'min') { } |
|
9 |
7 |
elsif ($opts{'type'} eq 'max') { } |
|
6 |
1 |
elsif ($opts{'type'} eq 'nonprop' or $opts{'type'} eq 'non-proportional') { } |
2391
|
0 |
0 |
unless ($scalefactor) |
2399
|
3 |
55 |
unless $new_width > 0 |
2401
|
3 |
55 |
unless $new_height > 0 |
2415
|
1 |
59 |
unless (defined wantarray) |
2421
|
1 |
58 |
unless $self->_valid_image("scale") |
2424
|
2 |
56 |
unless my($x_scale, $y_scale, $new_width, $new_height) = $self->scale_calculate(%opts) |
2428
|
17 |
39 |
if ($opts{'qtype'} eq 'normal') { } |
|
18 |
21 |
elsif ($opts{'qtype'} eq 'preview') { } |
|
20 |
1 |
elsif ($opts{'qtype'} eq 'mixing') { } |
2430
|
0 |
17 |
unless (defined $tmp->{'IMG'}) |
2435
|
0 |
17 |
unless (defined $img->{'IMG'}) |
2444
|
0 |
18 |
unless (defined $img->{'IMG'}) |
2452
|
0 |
20 |
unless ($img->{'IMG'}) |
2470
|
1 |
10 |
unless (defined wantarray) |
2476
|
1 |
9 |
unless $self->_valid_image("scaleX") |
2483
|
3 |
6 |
if ($opts{'pixels'}) |
2487
|
0 |
9 |
unless ($self->{'IMG'}) |
2494
|
0 |
9 |
unless (defined $img->{'IMG'}) |
2508
|
1 |
10 |
unless (defined wantarray) |
2514
|
1 |
9 |
unless $self->_valid_image("scaleY") |
2521
|
3 |
6 |
if ($opts{'pixels'}) |
2525
|
0 |
9 |
unless ($self->{'IMG'}) |
2531
|
0 |
9 |
unless (defined $img->{'IMG'}) |
2554
|
0 |
0 |
unless $self->_valid_image("transform") |
2557
|
0 |
0 |
if ($opts{'xexpr'} and $opts{'yexpr'}) |
2558
|
0 |
0 |
unless ($I2P) |
2561
|
0 |
0 |
if $INC[-1] eq "." |
2565
|
0 |
0 |
if ($@) |
2588
|
0 |
0 |
if (/$numre/) { } |
2589
|
0 |
0 |
if (/$numre/) { } |
2595
|
0 |
0 |
if (not exists $opts{'xopcodes'} or @{$opts{'xopcodes'};} == 0) |
2602
|
0 |
0 |
unless (defined $OPCODES{$iop} or $iop =~ /^\d+$/) |
2606
|
0 |
0 |
exists $OPCODES{$iop} ? : |
2612
|
0 |
0 |
if (not exists $opts{'yopcodes'} or @{$opts{'yopcodes'};} == 0) |
2619
|
0 |
0 |
unless (defined $OPCODES{$iop} or $iop =~ /^\d+$/) |
2623
|
0 |
0 |
exists $OPCODES{$iop} ? : |
2628
|
0 |
0 |
unless (exists $opts{'parm'}) |
2639
|
0 |
0 |
unless (defined $img->{'IMG'}) |
2651
|
26 |
4 |
if (@imgs) |
2654
|
1 |
27 |
unless ($img->_valid_image("transform2")) |
2672
|
28 |
1 |
if ($width) { } |
2680
|
28 |
0 |
if ($height) { } |
2689
|
0 |
28 |
unless ($code) |
2694
|
0 |
28 |
unless ($channels >= 1 and $channels <= 4) |
2703
|
1 |
27 |
unless (defined $img->{'IMG'}) |
2715
|
1 |
21 |
unless $self->_valid_image("rubthrough") |
2718
|
1 |
20 |
unless ($opts{'src'} and $opts{'src'}->_valid_image("rubthrough")) |
2730
|
18 |
2 |
unless defined $tx |
2731
|
2 |
18 |
unless defined $tx |
2734
|
18 |
2 |
unless defined $ty |
2735
|
2 |
18 |
unless defined $ty |
2737
|
0 |
20 |
unless (&i_rubthru($self->{'IMG'}, $opts{'src'}{'IMG'}, $tx, $ty, $opts{'src_minx'}, $opts{'src_miny'}, $opts{'src_maxx'}, $opts{'src_maxy'})) |
2757
|
1 |
57 |
unless $self->_valid_image("compose") |
2760
|
0 |
57 |
unless ($opts{'src'}) |
2765
|
1 |
56 |
unless ($opts{'src'}->_valid_image("compose")) |
2772
|
56 |
0 |
unless defined $left |
2773
|
9 |
47 |
unless defined $left |
2776
|
56 |
0 |
unless defined $top |
2777
|
9 |
47 |
unless defined $top |
2780
|
48 |
8 |
unless defined $src_left |
2781
|
48 |
8 |
unless defined $src_left |
2784
|
48 |
8 |
unless defined $src_top |
2785
|
48 |
8 |
unless defined $src_top |
2788
|
0 |
56 |
if (not defined $width and defined $opts{'src_maxx'}) |
2791
|
52 |
4 |
unless defined $width |
2794
|
0 |
56 |
if (not defined $height and defined $opts{'src_maxy'}) |
2797
|
52 |
4 |
unless defined $height |
2801
|
31 |
25 |
if ($opts{'mask'}) { } |
2802
|
1 |
30 |
unless ($opts{'mask'}->_valid_image("compose")) |
2808
|
0 |
30 |
unless defined $mask_left |
2809
|
0 |
30 |
unless defined $mask_left |
2812
|
0 |
30 |
unless defined $mask_top |
2813
|
0 |
30 |
unless defined $mask_top |
2815
|
10 |
20 |
unless (&i_compose_mask($self->{'IMG'}, $src->{'IMG'}, $opts{'mask'}{'IMG'}, $left, $top, $src_left, $src_top, $mask_left, $mask_top, $width, $height, $combine, $opts{'opacity'})) |
2824
|
10 |
15 |
unless (&i_compose($self->{'IMG'}, $src->{'IMG'}, $left, $top, $src_left, $src_top, $width, $height, $combine, $opts{'opacity'})) |
2838
|
1 |
143 |
unless $self->_valid_image("flip") |
2843
|
0 |
143 |
unless defined $opts{'dir'} and defined $xlate{$opts{'dir'}} |
2845
|
143 |
0 |
if &i_flipxy($self->{'IMG'}, $dir) |
2853
|
1 |
40 |
unless (defined wantarray) |
2859
|
1 |
39 |
unless $self->_valid_image("rotate") |
2862
|
28 |
11 |
if (defined $opts{'right'}) { } |
|
11 |
0 |
elsif (defined $opts{'radians'} or defined $opts{'degrees'}) { } |
2864
|
0 |
28 |
if ($degrees < 0) |
2868
|
2 |
26 |
if ($degrees == 0) { } |
|
26 |
0 |
elsif ($degrees == 90 or $degrees == 180 or $degrees == 270) { } |
2873
|
26 |
0 |
if ($result->{'IMG'} = &i_rotate90($self->{'IMG'}, $degrees)) { } |
2891
|
6 |
5 |
if ($back) { } |
2893
|
1 |
5 |
unless ($back) |
2903
|
10 |
0 |
if ($result->{'IMG'}) { } |
2921
|
1 |
4 |
unless $self->_valid_image("matrix_transform") |
2924
|
1 |
3 |
unless (defined wantarray) |
2930
|
3 |
0 |
if ($opts{'matrix'}) { } |
2935
|
1 |
2 |
if ($opts{'back'}) { } |
2938
|
0 |
1 |
unless $result->{'IMG'} = &i_matrix_transform($self->{'IMG'}, $xsize, $ysize, $opts{'matrix'}, $opts{'back'}) |
2943
|
0 |
2 |
unless $result->{'IMG'} = &i_matrix_transform($self->{'IMG'}, $xsize, $ysize, $opts{'matrix'}) |
2972
|
1 |
980 |
unless $self->_valid_image("box") |
2978
|
565 |
415 |
if (exists $opts{'box'}) { } |
2985
|
284 |
131 |
unless defined($xmin = $opts{'xmin'}) |
2986
|
282 |
133 |
unless defined($xmax = $opts{'xmax'}) |
2987
|
302 |
113 |
unless defined($ymin = $opts{'ymin'}) |
2988
|
301 |
114 |
unless defined($ymax = $opts{'ymax'}) |
2991
|
863 |
117 |
if ($opts{'filled'}) { } |
|
113 |
4 |
elsif ($opts{'fill'}) { } |
2994
|
861 |
2 |
if (defined $color) { } |
2995
|
145 |
716 |
unless (&_is_color_object($color)) |
2997
|
0 |
145 |
unless ($color) |
3007
|
826 |
37 |
if ($color->isa('Imager::Color')) { } |
3015
|
6 |
107 |
unless (UNIVERSAL::isa($opts{'fill'}, "Imager::Fill")) |
3018
|
0 |
6 |
unless ($opts{'fill'} = "Imager::Fill"->new(%{$opts{"fill"};})) |
3027
|
3 |
1 |
if (defined $color) { } |
3028
|
2 |
1 |
unless (&_is_color_object($color)) |
3030
|
0 |
2 |
unless ($color) |
3039
|
0 |
4 |
unless ($color) |
3052
|
1 |
256 |
unless $self->_valid_image("arc") |
3067
|
133 |
123 |
if ($opts{'aa'}) { } |
3068
|
2 |
131 |
if ($opts{'fill'}) { } |
|
33 |
98 |
elsif ($opts{'filled'}) { } |
3069
|
2 |
0 |
unless (UNIVERSAL::isa($opts{'fill'}, "Imager::Fill")) |
3072
|
0 |
2 |
unless ($opts{'fill'} = "Imager::Fill"->new(%{$opts{"fill"};})) |
3077
|
1 |
1 |
if ($opts{'d1'} == 0 and $opts{'d2'} == 361) { } |
3088
|
0 |
33 |
unless ($color) |
3092
|
8 |
25 |
if ($opts{'d1'} == 0 and $opts{'d2'} == 361 and $opts{'aa'}) { } |
3103
|
25 |
73 |
if ($opts{'d2'} - $opts{'d1'} >= 360) { } |
3112
|
10 |
113 |
if ($opts{'fill'}) { } |
3113
|
10 |
0 |
unless (UNIVERSAL::isa($opts{'fill'}, "Imager::Fill")) |
3116
|
1 |
9 |
unless ($opts{'fill'} = "Imager::Fill"->new(%{$opts{"fill"};})) |
3126
|
0 |
113 |
unless ($color) |
3130
|
51 |
62 |
if ($opts{'filled'}) { } |
3135
|
13 |
49 |
if ($opts{'d1'} == 0 and $opts{'d2'} == 361) { } |
3144
|
0 |
254 |
unless ($good) |
3163
|
1 |
211 |
unless $self->_valid_image("line") |
3166
|
0 |
211 |
unless (exists $opts{'x1'} and exists $opts{'y1'}) |
3167
|
0 |
211 |
unless (exists $opts{'x2'} and exists $opts{'y2'}) |
3170
|
0 |
211 |
unless ($color) |
3175
|
145 |
66 |
if defined $opts{'aa'} |
3176
|
146 |
65 |
if ($opts{'antialias'}) { } |
3195
|
1 |
5 |
unless $self->_valid_image("polyline") |
3198
|
1 |
4 |
if (exists $opts{'points'}) |
3199
|
4 |
0 |
if (not exists $opts{'points'} and exists $opts{'x'} and exists $opts{'y'}) |
3206
|
0 |
5 |
unless ($color) |
3210
|
1 |
4 |
if defined $opts{'aa'} |
3211
|
2 |
3 |
if ($opts{'antialias'}) { } |
3213
|
4 |
2 |
if (defined $ls) |
3220
|
263 |
3 |
if (defined $ls) |
3235
|
1 |
10 |
unless $self->_valid_image("polygon") |
3238
|
8 |
2 |
if (exists $opts{'points'}) |
3243
|
0 |
10 |
unless (exists $opts{'x'} and exists $opts{'y'}) |
3249
|
4 |
6 |
if ($opts{'fill'}) { } |
3250
|
3 |
1 |
unless (UNIVERSAL::isa($opts{'fill'}, "Imager::Fill")) |
3253
|
0 |
3 |
unless ($opts{'fill'} = "Imager::Fill"->new(%{$opts{"fill"};})) |
3258
|
1 |
3 |
unless (&i_poly_aa_cfill_m($self->{'IMG'}, $opts{'x'}, $opts{'y'}, $mode, $opts{'fill'}{'fill'})) |
3265
|
0 |
6 |
unless ($color) |
3269
|
1 |
5 |
unless (&i_poly_aa_m($self->{'IMG'}, $opts{'x'}, $opts{'y'}, $mode, $color)) |
3280
|
0 |
6 |
unless $self->_valid_image("polypolygon") |
3284
|
0 |
6 |
unless $points |
3289
|
6 |
0 |
if ($opts{'filled'}) { } |
|
0 |
0 |
elsif ($opts{'fill'}) { } |
3290
|
0 |
6 |
unless my $color = _color(_first($opts{'color'}, [0, 0, 0, 0])) |
3293
|
0 |
6 |
unless &i_poly_poly_aa($self->{'IMG'}, $points, $mode, $color) |
3298
|
0 |
0 |
unless $self->_valid_fill($fill, "polypolygon") |
3302
|
0 |
0 |
unless &i_poly_poly_aa_cfill($self->{'IMG'}, $points, $mode, $fill->{'fill'}) |
3305
|
0 |
0 |
unless my $color = _color(_first($opts{'color'}, [0, 0, 0, 255])) |
3310
|
0 |
0 |
if (_first($opts{'aa'}, 1)) { } |
3350
|
0 |
0 |
unless $self->_valid_image("polybezier") |
3353
|
0 |
0 |
if (exists $opts{'points'}) |
3358
|
0 |
0 |
unless (@{$opts{'x'};} and @{$opts{'x'};} == @{$opts{'y'};}) |
3364
|
0 |
0 |
unless ($color) |
3377
|
1 |
89 |
unless $self->_valid_image("flood_fill") |
3380
|
0 |
89 |
unless (exists $opts{'x'} and exists $opts{'y'}) |
3385
|
2 |
87 |
if ($opts{'border'}) { } |
3387
|
0 |
2 |
unless ($border) |
3391
|
1 |
1 |
if ($opts{'fill'}) { } |
3392
|
1 |
0 |
unless (UNIVERSAL::isa($opts{'fill'}, "Imager::Fill")) |
3395
|
0 |
1 |
unless ($opts{'fill'} = "Imager::Fill"->new(%{$opts{"fill"};})) |
3405
|
0 |
1 |
unless ($color) |
3412
|
2 |
0 |
if ($rc) { } |
3421
|
1 |
86 |
if ($opts{'fill'}) { } |
3422
|
1 |
0 |
unless (UNIVERSAL::isa($opts{'fill'}, "Imager::Fill")) |
3425
|
0 |
1 |
unless ($opts{'fill'} = "Imager::Fill"->new(%{$opts{"fill"};})) |
3434
|
0 |
86 |
unless ($color) |
3440
|
87 |
0 |
if ($rc) { } |
3453
|
1 |
127 |
unless $self->_valid_image("setpixel") |
3457
|
1 |
126 |
unless (defined $color) |
3459
|
1 |
0 |
unless defined $color |
3462
|
84 |
43 |
unless (ref $color and UNIVERSAL::isa($color, "Imager::Color")) |
3463
|
1 |
83 |
unless ($color = _color($color, "setpixel")) |
3469
|
2 |
124 |
unless (exists $opts{'x'} and exists $opts{'y'}) |
3476
|
9 |
115 |
if (ref $x or ref $y) { } |
3477
|
7 |
2 |
ref $x ? : |
3478
|
7 |
2 |
ref $y ? : |
3479
|
1 |
8 |
unless (@$x) |
3483
|
1 |
7 |
unless (@$y) |
3489
|
1 |
6 |
if (@$x < @$y) { } |
|
1 |
5 |
elsif (@$y < @$x) { } |
3497
|
5 |
2 |
if ($color->isa('Imager::Color')) { } |
3499
|
15 |
2 |
unless &i_ppix($self->{'IMG'}, $x->[$i], $y->[$i], $color) |
3505
|
6 |
2 |
unless &i_ppixf($self->{'IMG'}, $x->[$i], $y->[$i], $color) |
3513
|
84 |
31 |
if ($color->isa('Imager::Color')) { } |
3514
|
18 |
66 |
if &i_ppix($self->{'IMG'}, $x, $y, $color) |
3518
|
18 |
13 |
if &i_ppixf($self->{'IMG'}, $x, $y, $color) |
3531
|
1 |
238 |
unless $self->_valid_image("getpixel") |
3534
|
2 |
236 |
unless (exists $opts{'x'} and exists $opts{'y'}) |
3542
|
19 |
217 |
if (ref $x or ref $y) { } |
3543
|
17 |
2 |
ref $x ? : |
3544
|
15 |
4 |
ref $y ? : |
3545
|
1 |
18 |
unless (@$x) |
3549
|
1 |
17 |
unless (@$y) |
3555
|
1 |
16 |
if (@$x < @$y) { } |
|
3 |
13 |
elsif (@$y < @$x) { } |
3563
|
13 |
4 |
if ($type eq '8bit') { } |
|
3 |
1 |
elsif ($type eq 'float' or $type eq 'double') { } |
3577
|
16 |
0 |
wantarray ? : |
3580
|
195 |
22 |
if ($type eq '8bit') { } |
|
21 |
1 |
elsif ($type eq 'float' or $type eq 'double') { } |
3597
|
1 |
38 |
unless $self->_valid_image("getscanline") |
3600
|
17 |
21 |
unless defined $opts{'width'} |
3602
|
1 |
37 |
unless (defined $opts{'y'}) |
3607
|
16 |
21 |
if ($opts{'type'} eq '8bit') { } |
|
12 |
9 |
elsif ($opts{'type'} eq 'float') { } |
|
8 |
1 |
elsif ($opts{'type'} eq 'index') { } |
3616
|
0 |
8 |
unless (&i_img_type($self->{'IMG'})) |
3633
|
1 |
214 |
unless $self->_valid_image("setscanline") |
3636
|
0 |
214 |
unless (defined $opts{'y'}) |
3641
|
200 |
14 |
unless ($opts{'type'}) |
3642
|
49 |
151 |
if (ref $opts{'pixels'} and @{$opts{'pixels'};}) { } |
3644
|
32 |
17 |
if ($opts{'pixels'}[0]->isa('Imager::Color')) { } |
|
17 |
0 |
elsif ($opts{'pixels'}[0]->isa('Imager::Color::Float')) { } |
3661
|
183 |
31 |
if ($opts{'type'} eq '8bit') { } |
|
18 |
13 |
elsif ($opts{'type'} eq 'float') { } |
|
13 |
0 |
elsif ($opts{'type'} eq 'index') { } |
3662
|
32 |
151 |
if (ref $opts{'pixels'}) { } |
3670
|
17 |
1 |
if (ref $opts{'pixels'}) { } |
3678
|
9 |
4 |
if (ref $opts{'pixels'}) { } |
3695
|
1 |
312 |
unless $self->_valid_image("getsamples") |
3698
|
288 |
24 |
unless defined $opts{'width'} |
3700
|
0 |
312 |
unless (defined $opts{'y'}) |
3705
|
3 |
309 |
if ($opts{'target'}) { } |
3708
|
1 |
2 |
if ($opts{'type'} eq '8bit') { } |
|
1 |
1 |
elsif ($opts{'type'} eq 'float') { } |
|
1 |
0 |
elsif ($opts{'type'} =~ /^(\d+)bit$/) { } |
3711
|
0 |
1 |
unless my(@samples) = &i_gsamp($self->{'IMG'}, $opts{'x'}, $opts{'x'} + $opts{'width'}, $opts{'y'}, $opts{'channels'}) |
3728
|
0 |
1 |
unless (defined $count) |
3741
|
297 |
12 |
if ($opts{'type'} eq '8bit') { } |
|
12 |
0 |
elsif ($opts{'type'} eq 'float') { } |
|
0 |
0 |
elsif ($opts{'type'} =~ /^(\d+)bit$/) { } |
3755
|
0 |
0 |
unless &i_gsamp_bits($self->{'IMG'}, $opts{'x'}, $opts{'x'} + $opts{'width'}, $opts{'y'}, $bits, \@data, 0, $opts{'channels'}) |
3768
|
1 |
14 |
unless $self->_valid_image("setsamples") |
3776
|
13 |
35 |
if ($_[$i] eq 'data') { } |
3786
|
1 |
13 |
unless (defined $data_index) |
3790
|
1 |
12 |
unless (defined $_[$data_index]) |
3796
|
5 |
7 |
unless defined $type |
3799
|
0 |
12 |
defined $opts{'width'} ? : |
3802
|
5 |
7 |
if ($type eq '8bit') { } |
|
5 |
2 |
elsif ($type eq 'float') { } |
|
1 |
1 |
elsif ($type =~ /^([0-9]+)bit$/) { } |
3813
|
0 |
1 |
unless (ref $_[$data_index]) |
3827
|
4 |
7 |
unless (defined $count) |
3851
|
1 |
17 |
unless $self->_valid_image("convert") |
3854
|
1 |
16 |
unless (defined wantarray) |
3862
|
14 |
2 |
if (not exists $opts{'matrix'}) { } |
3863
|
14 |
0 |
if (exists $opts{'preset'}) { } |
3868
|
3 |
11 |
if ($opts{'preset'} eq 'gray' or $opts{'preset'} eq 'grey') { } |
|
1 |
10 |
elsif ($opts{'preset'} eq 'noalpha') { } |
|
0 |
10 |
elsif ($opts{'preset'} eq 'red' or $opts{'preset'} eq 'channel0') { } |
|
0 |
10 |
elsif ($opts{'preset'} eq 'green' or $opts{'preset'} eq 'channel1') { } |
|
3 |
7 |
elsif ($opts{'preset'} eq 'blue' or $opts{'preset'} eq 'channel2') { } |
|
0 |
7 |
elsif ($opts{'preset'} eq 'alpha') { } |
|
6 |
1 |
elsif ($opts{'preset'} eq 'rgb') { } |
|
1 |
0 |
elsif ($opts{'preset'} eq 'addalpha') { } |
3870
|
3 |
0 |
if ($self->getchannels == 3) { } |
|
0 |
0 |
elsif ($self->getchannels == 4) { } |
3885
|
1 |
0 |
if ($self->getchannels == 2 or $self->getchannels == 4) { } |
3904
|
0 |
0 |
if ($self->getchannels == 2 or $self->getchannels == 4) { } |
3913
|
6 |
0 |
if ($self->getchannels == 1) { } |
|
0 |
0 |
elsif ($self->getchannels == 2) { } |
3925
|
0 |
1 |
if ($self->getchannels == 1) { } |
|
1 |
0 |
elsif ($self->getchannels == 3) { } |
3947
|
1 |
15 |
unless ($new->{'IMG'}) |
3961
|
1 |
13 |
unless ($src) |
3968
|
1 |
20 |
unless (eval {
do {
$img->isa("Imager")
}
}) |
3972
|
1 |
19 |
unless ($img->_valid_image("combine")) |
3979
|
4 |
7 |
if (my $channels = delete $opts{'channels'}) { } |
3985
|
4 |
7 |
unless ($result) |
4003
|
1 |
5 |
unless $self->_valid_image("map") |
4006
|
1 |
4 |
unless (exists $opts{'maps'}) |
4010
|
3 |
1 |
if (exists $opts{$chlist[$chnum]}) { } |
|
0 |
1 |
elsif (exists $opts{'all'}) { } |
4017
|
5 |
0 |
if ($opts{'maps'} and $self->{'IMG'}) |
4026
|
1 |
6 |
unless $self->_valid_image("difference") |
4029
|
4 |
2 |
unless defined $opts{'mindist'} |
4032
|
0 |
6 |
unless defined $opts{'other'} |
4033
|
1 |
5 |
unless ($opts{'other'}->_valid_image("difference")) |
4041
|
0 |
5 |
unless $result->{'IMG'} = &i_diff_image($self->{'IMG'}, $opts{'other'}{'IMG'}, $opts{'mindist'}) |
4049
|
0 |
1 |
unless $self->_valid_image("rgb_difference") |
4053
|
0 |
1 |
unless defined $opts{'other'} |
4054
|
0 |
1 |
unless ($opts{'other'}->_valid_image("rgb_difference")) |
4061
|
0 |
1 |
unless $result->{'IMG'} = &i_rgbdiff_image($self->{'IMG'}, $opts{'other'}{'IMG'}) |
4080
|
1 |
2041 |
unless $self->_valid_image("getwidth") |
4091
|
1 |
1738 |
unless $self->_valid_image("getheight") |
4102
|
1 |
648 |
unless $self->_valid_image("getchannels") |
4113
|
1 |
6 |
unless $self->_valid_image("colormodel") |
4118
|
1 |
5 |
$opts{'numeric'} ? : |
4124
|
1 |
5 |
unless $self->_valid_image("colorchannels") |
4133
|
1 |
5 |
unless $self->_valid_image("alphachannel") |
4144
|
1 |
1 |
unless $self->_valid_image("getmask") |
4158
|
1 |
27 |
unless $self->_valid_image("setmask") |
4161
|
0 |
27 |
unless (defined $opts{'mask'}) |
4177
|
1 |
9 |
unless $self->_valid_image("getcolorcount") |
4181
|
1 |
8 |
$rc == -1 ? : |
4189
|
1 |
3 |
unless $self->_valid_image("getcolorusagehash") |
4194
|
0 |
3 |
unless (defined $max_colors and $max_colors > 0) |
4202
|
0 |
3 |
if $channels == 2 or $channels == 4 |
4210
|
1 |
125 |
if keys %color_use > $max_colors |
4222
|
1 |
5 |
unless $self->_valid_image("getcolorusage") |
4227
|
0 |
5 |
unless (defined $max_colors and $max_colors > 0) |
4240
|
1 |
0 |
unless $self->_valid_image("string") |
4244
|
0 |
0 |
unless defined $input{'string'} |
4246
|
0 |
0 |
unless (defined $input{'string'}) |
4251
|
0 |
0 |
unless ($input{'font'}) |
4256
|
0 |
0 |
unless ($input{'font'}->draw("image", $self, %input)) |
4267
|
1 |
0 |
if (ref $self) { } |
4268
|
1 |
0 |
unless $self->_valid_image("align_string") |
4279
|
0 |
0 |
unless defined $input{'string'} |
4281
|
0 |
0 |
unless (exists $input{'string'}) |
4286
|
0 |
0 |
unless ($input{'font'}) |
4292
|
0 |
0 |
unless (@result = $input{'font'}->align("image", $img, %input)) |
4296
|
0 |
0 |
wantarray ? : |
4307
|
23 |
2 |
if ($opts{'reset'}) { } |
4315
|
22 |
53 |
if defined $opts{$key} |
4337
|
1 |
10 |
if ($opts{'sample_size'} and $opts{'sample_size'} eq "float") |
4342
|
1 |
37 |
unless (defined $opts{$name}) |
4346
|
1 |
36 |
unless ($opts{$name} == int $opts{$name}) |
4353
|
6 |
3 |
unless ($result) |
4379
|
260 |
71 |
ref $_[0] ? : |
4385
|
169 |
34 |
if (ref $self) { } |
4424
|
0 |
121 |
unless my($ext) = $name =~ /\.([^.]+)$/ |
4428
|
2 |
119 |
unless ($type) |
4432
|
0 |
121 |
if (not defined $type and $ext =~ /\A[a-zA-Z0-9_]{2,}\z/) |
4444
|
1 |
0 |
unless exists $ext_types{lc $ext} |
4457
|
0 |
1389 |
if ($_ < $mx) |
4465
|
1120 |
19 |
if ($_ > $mx) |
4490
|
0 |
0 |
unless defined $str |
4497
|
0 |
0 |
if (/^\004\004/) |
4500
|
0 |
0 |
if ($item =~ /^x/) |
4504
|
0 |
0 |
if ($item =~ /^P/) |
4508
|
0 |
0 |
if ($item =~ /^i/) |
4512
|
0 |
0 |
if ($item =~ /^n/) |
4526
|
0 |
0 |
unless $lang eq "C" or $lang eq "CPP" |
4544
|
1 |
0 |
if $INC[-1] eq "." |
4565
|
1 |
18 |
if (tied *$fh) { } |
4576
|
0 |
2 |
unless defined $count |
4578
|
1 |
1 |
unless $count |
4583
|
2 |
0 |
if ($_[1] != 1 or $_[0] != 0) |
4584
|
0 |
2 |
unless (CORE::seek $fh, $_[0], $_[1]) |
4620
|
0 |
75 |
if ($loaded) { } |
4624
|
75 |
0 |
if ($error =~ /^Can't locate /) |
4638
|
10 |
9 |
if exists $self->[0]{$key} |
4640
|
4 |
5 |
unless $self->[3]{$key} |
4660
|
0 |
0 |
if (exists $self->[0]{$key}) |
4661
|
0 |
0 |
unless my $value = $self->[0]{$key} |
4666
|
0 |
0 |
unless $self->_check($key) |
4674
|
10 |
23 |
unless (@{$self->[1];}) |
4680
|
0 |
70 |
if $self->[0]{$key} |
4682
|
0 |
70 |
if $self->_check($key) |
4686
|
0 |
33 |
unless @{$self->[1];} |
4694
|
33 |
132 |
unless $self->[2] < @{$self->[1];} |