1Image::Info::SVG(3)   User Contributed Perl Documentation  Image::Info::SVG(3)
2
3
4

NAME

6       Image::Info::SVG - SVG support for Image::Info
7

SYNOPSIS

9        use Image::Info qw(image_info dim);
10
11        my $info = image_info("image.svg");
12        if (my $error = $info->{error}) {
13            die "Can't parse image info: $error\n";
14        }
15        my $title = $info->{SVG_Title};
16
17        my($w, $h) = dim($info);
18

DESCRIPTION

20       This modules supplies the standard key names except for BitsPerSample,
21       Compression, Gamma, Interlace, LastModificationTime, as well as:
22
23       ImageDescription
24           The image description, corresponds to <desc>.
25
26       SVG_Image
27           A scalar or reference to an array of scalars containing the URI's
28           of embedded images (JPG or PNG) that are embedded in the image.
29
30       SVG_StandAlone
31           Whether or not the image is standalone.
32
33       SVG_Title
34           The image title, corresponds to <title>
35
36       SVG_Version
37           The URI of the DTD the image conforms to.
38

METHODS

40   process_file()
41               $info->process_file($source, $options);
42
43       Processes one file and sets the found info fields in the $info object.
44

FILES

46       This module requires either XML::LibXML::Reader or XML::Simple.
47

COMPATIBILITY

49       Previous versions (until Image-Info-1.28) used XML::Simple as the
50       underlying parser. Since Image-Info-1.29 the default parser is
51       XML::LibXML::Reader (which is much more faster, memory-efficient, and
52       does not rely on regular expressions for some aspects of XML parsing.
53       If for some reason you need the old parser, you can force it by setting
54       the variable @Image::Info::SVG::PREFER_MODULE as early as possible:
55
56           use Image::Info;
57           @Image::Info::SVG::PREFER_MODULE = qw(Image::Info::SVG::XMLSimple Image::Info::SVG::XMLLibXMLReader);
58
59       The variable $Image::Info::SVG::USING_MODULE can be queried to see
60       which parser is in use (after Image::Info::SVG is required).
61

SEE ALSO

63       Image::Info, XML::LibXML::Reader, XML::Simple
64

NOTES

66       For more information about SVG see <http://www.w3.org/Graphics/SVG/>
67
68       Random notes:
69
70         Colors
71           # iterate over polygon,rect,circle,ellipse,line,polyline,text for style->stroke: style->fill:?
72           #  and iterate over each of these within <g> too?! and recurse?!
73           # append <color>'s
74           # perhaps even deep recursion through <svg>'s?
75         ColorProfile <color-profile>
76         RenderingIntent ?
77         requiredFeatures
78         requiredExtensions
79         systemLanguage
80

AUTHOR

82       Jerrad Pierce <belg4mit@mit.edu>/<webmaster@pthbb.org> wrote the
83       original code based on XML::Simple
84
85       Slaven Rezic <srezic@cpan.org> wrote the code using XML::LibXML::Reader
86
87       This library is free software; you can redistribute it and/or modify it
88       under the same terms as Perl itself.
89
90
91
92perl v5.16.3                      2011-12-28               Image::Info::SVG(3)
Impressum