13 use_ok
("Image::Info") or die($@
);
16 use Image
::Info
qw(image_info dim);
18 my $i = image_info
("../img/test.svg") ||
19 die ("Couldn't read test.svg: $!");
21 #use Data::Dumper; print Dumper($i), "\n";
23 is
($i->{color_type
}, 'sRGB', 'color_type');
24 is
($i->{file_media_type
}, 'image/svg+xml', 'file_media_type');
26 is
($i->{SVG_StandAlone
}, 'yes', 'SVG_StandAlone');
27 is
($i->{file_ext
}, 'svg', 'file_ext');
28 is
($i->{SVG_Version
}, 'unknown', 'SVG_Version unknown');
30 is
(dim
($i), '4inx3in', 'dim()');
32 #############################################################################
34 $i = image_info
("../img/graph.svg") ||
35 die ("Couldn't read graph.svg: $!");
37 #use Data::Dumper; print Dumper($i), "\n";
39 is
($i->{SVG_StandAlone
}, 'yes', 'SVG_StandAlone');
40 is
($i->{file_ext
}, 'svg', 'file_ext');
41 is
($i->{file_media_type
}, 'image/svg+xml', 'file_media_type');
42 is
($i->{SVG_Title
}, 'Untitled graph', 'title');
43 is
($i->{SVG_Version
}, '1.1', 'SVG_Version 1.1');
45 is
(dim
($i), '209x51', 'dim()');