[Clipart] Re: SVG support for getID3

James Heinrich - getID3 info at getid3.org
Tue Feb 14 03:48:56 PST 2006


Hi Bryce,

Two things. The simple thing is to figure out the magic bytes that identify 
SVG files and add those into GetFileFormatArray() in getid3.php

The big task is to create module.graphic.svg.php and make it work. I'd 
suggest starting with module.graphic.jpg.php and modify it to suit your 
needs. Stick whatever data you think appropriate wherever it best fits under 
$ThisFileInfo['svg']. What is required is to set the common subkeys of 
$ThisFileInfo['video'] (datatformat, lossless, bits_per_sample, 
pixel_aspect_ratio, resolution_x, resolution_y), as well as 
$ThisFileInfo['fileformat'].

Actually, to simplify your life, I've attached a rough framework for 
module.graphic.svg.php -- please modify as appropriate.

--
James Heinrich
http://getid3.sourceforge.net


----- Original Message ----- 
From: "Bryce Harrington" <bryce at bryceharrington.org>
To: <info at getid3.org>
Cc: <cctools-cchost at lists.sourceforge.net>; "Open Clip Art Library list" 
<clipart at lists.freedesktop.org>; "Victor Stone" <victor at fourstones.net>
Sent: Tuesday, February 14, 2006 3:44 AM
Subject: SVG support for getID3


> Hi James,
>
> I'm a developer of a 2D graphics program called Inkscape, that produces
> files in the 'SVG' format.  One of our efforts is the creation of an
> online graphics repository called http://www.openclipart.org.  For this
> project we are experimenting with using ccHost for managing user
> uploads.  This program uses your getID3 program for gathering info about
> the uploaded files.
>
> I would like to add SVG support to getid3 in order for ccHost to be able
> to handle the SVG clipart files.  SVG is a w3c standard vector graphics
> format supported by dozens of open source and proprietary programs, so I
> think this would make a solid addition for getid3.
>
> SVG is an XML format.  It is also scalable, which means the files do not
> have absolute height/width settings, so it's not a perfect analogy to
> the png/jpg modules.
>
> I'm pretty familiar with the SVG format; in addition to Inkscape I also
> wrote the Perl SVG::Metadata module for extracting/inserting metadata
> into SVG files.  However, I'm a little bit lost about what I would need
> to do to add support for this format to getID3.  I was wondering if you
> could provide some advice/tips on what would I should do to add this
> support?
>
> Thanks,
> Bryce 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: module.graphic.svg.php
Type: application/octet-stream
Size: 2057 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/clipart/attachments/20060214/b64232db/attachment.obj>


More information about the clipart mailing list