.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Image::Info::SVG 3pm" .TH Image::Info::SVG 3pm "2019-11-24" "perl v5.30.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Image::Info::SVG \- SVG support for Image::Info .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Image::Info qw(image_info dim); \& \& my $info = image_info("image.svg"); \& if (my $error = $info\->{error}) { \& die "Can\*(Aqt parse image info: $error\en"; \& } \& my $title = $info\->{SVG_Title}; \& \& my($w, $h) = dim($info); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This modules supplies the standard key names except for BitsPerSample, Compression, Gamma, Interlace, LastModificationTime, as well as: .IP "ImageDescription" 4 .IX Item "ImageDescription" The image description, corresponds to . .IP "SVG_Image" 4 .IX Item "SVG_Image" A scalar or reference to an array of scalars containing the \s-1URI\s0's of embedded images (\s-1JPG\s0 or \s-1PNG\s0) that are embedded in the image. .IP "SVG_StandAlone" 4 .IX Item "SVG_StandAlone" Whether or not the image is standalone. .IP "SVG_Title" 4 .IX Item "SVG_Title" The image title, corresponds to .IP "SVG_Version" 4 .IX Item "SVG_Version" The \s-1URI\s0 of the \s-1DTD\s0 the image conforms to. .SH "METHODS" .IX Header "METHODS" .SS "\fBprocess_file()\fP" .IX Subsection "process_file()" .Vb 1 \& $info\->process_file($source, $options); .Ve .PP Processes one file and sets the found info fields in the \f(CW$info\fR object. .SH "FILES" .IX Header "FILES" This module requires either XML::LibXML::Reader or XML::Simple. .SH "COMPATIBILITY" .IX Header "COMPATIBILITY" Previous versions (until Image\-Info\-1.28) used XML::Simple as the underlying parser. Since Image\-Info\-1.29 the default parser is XML::LibXML::Reader which is much more faster, memory-efficient, and does not rely on regular expressions for some aspects of \s-1XML\s0 parsing. If for some reason you need the old parser, you can force it by setting the variable \f(CW@Image::Info::SVG::PREFER_MODULE\fR as early as possible: .PP .Vb 2 \& use Image::Info; \& @Image::Info::SVG::PREFER_MODULE = qw(Image::Info::SVG::XMLSimple Image::Info::SVG::XMLLibXMLReader); .Ve .PP The variable \f(CW$Image::Info::SVG::USING_MODULE\fR can be queried to see which parser is in use (after \fBImage::Info::SVG\fR is required). .PP Since 1.38_50 processing of \s-1XML\s0 external entities (\s-1XXE\s0) is not done anymore for security reasons in both backends (\fBImage::Info::SVG::XMLLibXMLReader\fR and \&\fBImage::Info::SVG::XMLSimple\fR). Controlling \s-1XXE\s0 processing behavior in \fBXML::Simple\fR is not really possible (see <https://rt.cpan.org/Ticket/Display.html?id=83794>), so as a workaround the underlying \s-1SAX\s0 parser is fixed to XML::SAX::PurePerl which is uncapable of processing external entities — but unfortunately it is also a slow parser. .SH "SEE ALSO" .IX Header "SEE ALSO" Image::Info, XML::LibXML::Reader, XML::Simple, XML::SAX::PurePerl .SH "NOTES" .IX Header "NOTES" For more information about \s-1SVG\s0 see <http://www.w3.org/Graphics/SVG/> .PP Random notes: .PP .Vb 10 \& Colors \& # iterate over polygon,rect,circle,ellipse,line,polyline,text for style\->stroke: style\->fill:? \& # and iterate over each of these within <g> too?! and recurse?! \& # append <color>\*(Aqs \& # perhaps even deep recursion through <svg>\*(Aqs? \& ColorProfile <color\-profile> \& RenderingIntent ? \& requiredFeatures \& requiredExtensions \& systemLanguage .Ve .SH "AUTHOR" .IX Header "AUTHOR" Jerrad Pierce <belg4mit@mit.edu>/<webmaster@pthbb.org> wrote the original code based on XML::Simple .PP Slaven Rezic <srezic@cpan.org> wrote the code using XML::LibXML::Reader .PP This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.