[Clipart] file/magic/mime types for SVG and suggested viewers?

Bryce Harrington bryce at bryceharrington.com
Fri Jun 4 23:19:15 PDT 2004

On Fri, 4 Jun 2004, Jeremy C. Reed wrote:
> On Fri, 4 Jun 2004, Bryce Harrington wrote:
> > On Fri, 4 Jun 2004, Jeremy C. Reed wrote:
> > > Is there a MIME type for SVG data?
> >
> > Yes, it's either image/x-svg or image/svg+xml
> >
> > > Is there any file(1) magic(5) for SVG images?
> >
> > Dunno, but if not would you like to help send the file/magic maintainers
> > a patch to add it?
> I can submit it. But I don't know if it is possible to create a magic(5)
> for SVG since they can start so many different ways.

Hmm, good point, though isn't XML by definition supposed to contain
indicators of what *type* of XML it is?  Perhaps there's a mailing list
we could ask on for direction?

> Does anyone know how to configure magic so the offset is not forced? (For
> example "<!DOCTYPE svg" could be at 141 position or could be at some other
> position. Or the "<svg" marker may be at some random place.

I'm also CCing to the Inkscape mailing list in case someone there can
answer it.

> > Thanks, I can add these to the faq, unless you'd like to?  I don't know
> > the answer for the third, though, so if you run across the answer let me
> > know.
> I added the questions. But I don't have the answers. (That is why I posted
> to list.)

Okay, well for the first two questions I can provide some answers:

Viewers - the de facto standard viewer for SVG is Batik.  The Adobe SVG
viewer plugin is also used, although I think it may only work under
Windows.  There is also a SVG renderer in library form, called librsvg.
There are a number of tools and applications that provide SVG viewing
support via that.  I understand there is also a svg2png tool, although
I've not used it myself.

Editing - I put in my plug for Inkscape as a good SVG editor, but there
are a lot of other ones out there.  In the proprietary world, Adobe
Illustrator is very good, although SVG is not its native format as it is
with Inkscape.  In the open source world, Inkscape, Sodipodi, Sketch
(aka Skencil), and Karbon14 are worth looking at.  Some additional tools
(some SVG, some not) are listed here:

Also, for programmatic generation of SVG there's a wide variety of
libraries available nowdays.  For instance, Perl has a number of
different SVG modules available via http://www.cpan.org/


More information about the clipart mailing list