[Clipart] Re: SVG support for getID3

Bryce Harrington bryce at bryceharrington.org
Wed Feb 15 13:19:44 PST 2006


On Wed, Feb 15, 2006 at 11:24:19AM -0800, Jon Phillips wrote:
> On Wed, 2006-02-15 at 11:13 -0500, Jonadab the Unsightly One wrote:
> > "James Heinrich - getID3" <info at getid3.org> writes:
> > 
> > > The simple thing is to figure out the magic bytes that identify SVG
> > 
> > The "simple thing", eh?
> > 
> > I suspect that may prove to be the harder thing, of the two.
> > 
> > I was almost sure we previously discussed the question of magic bytes
> > for SVG and concluded that there aren't any as such.
> 
> Right, since SVG is plain text. I think we should consider that we might
> need our own php equivalent to SVG::Metadata.

Hmm, I also notice that mimetype is able to correctly determine the
SVG-ness of the file:

$ mimetype daggers.svg
daggers.svg: image/svg+xml

And here's a way to get the same via xml_grep:

$ xml_grep --text --root svg daggers.svg       
image/svg+xml16"32"8.25"5.85"8"13.86"16"27.70"39.17"

I wonder if `mimetype` would be sufficient to the task?

Bryce



More information about the clipart mailing list