Terence Eden. He has a beard and is smiling.
Theme Switcher:

Which Copyleft Licence is Suitable for an SVG?

· 10 comments · 1,150 words · Viewed ~2,529 times


The Scalable Vector Graphics (SVG) format is amazing. It allows you to precisely define how an image should look. Written in XML, it uses various mathematical operations to display an image which looks crisp and clear at any size.

Here's a trivial example:

 SVG<svg height="100" viewBox="0 0 100 100" width="100" xmlns="http://www.w3.org/2000/svg">
   <circle cx="50" cy="50"  fill="#f00" r="50"/>
</svg>

That code produces this circle:

You could print that out with a kilometre radius and it would still be a perfect circle - unlike a traditional raster image which is just a grid of blocky pixels.

But suppose you wanted to freely share your SVG with others - and ensure that they also freely share it. What sort of "Copyleft" licence would you give it?

Creative Commons

The obvious choice seems to be a Creative Commons Share-Alike licence. SVGs are images. Images are creative works. Creative Commons is suitable for creative works. Job done!

But…

SVGs are not images. The are code which produce images. If we assume that an SVG is software, this entry in the FAQ becomes relevant:

Can I apply a Creative Commons license to software?

We recommend against using Creative Commons licenses for software.

[…]

Unlike software-specific licenses, CC licenses do not contain specific terms about the distribution of source code, which is often important to ensuring the free reuse and modifiability of software.

[…]

Additionally, our licenses are currently not compatible with the major software licenses, so it would be difficult to integrate CC-licensed work with other free software. Existing software licenses were designed specifically for use with software and offer a similar set of rights to the Creative Commons licenses.

At the end of that FAQ, they also say:

While we recommend against using a CC license on software itself, CC licenses may be used for software documentation, as well as for separate artistic elements such as game art or music.

So, that's a perhaps?

GPL

But let us assume that an SVG is a piece of media rather than software. Would it be suitable to use a software licence for it?

The various Gnu Public Licences have this to say:

Can I use the GPL for something other than software?

You can apply the GPL to any kind of work, as long as it is clear what constitutes the “source code” for the work. The GPL defines this as the preferred form of the work for making changes in it.

A photo JPEG might be derived from the RAW image file. In which case, the RAW is suitable for being GPL'd, not the resultant JPEG.

Similarly, the Photoshop file of a complex and multi-layered illustration would suitable, but not the outputted PNG.

An SVG can straddle both worlds. It's possible to build an SVG with layers, groups, and transformations, and then simplify it for output. You could edit the optimised version, but it's hardly the preferred format.

I read the GPL (so you don't have to) and right at the start it says:

The GNU General Public License is a free, copyleft license for software and other kinds of works.

(Emphasis added.)

But do they mean that?

Licenses for Other Types of Works

[…]

We don't take the position that artistic or entertainment works must be free, but if you want to make one free, we recommend the Free Art License.

But, as delightful as the Free Art License is, the FSF say:

Please don't use it for software or documentation, since it is incompatible with the GNU GPL and with the GNU FDL.

Is an SVG software or not?

I think so.

  • It's written in plain text.
  • It contains definitions, variables, and instructions.
  • It can contain scripting.

That sure looks like software to me!

But, at the same time, the user experiences it as a graphic. An animated GIF, for example, contains a small amount of code-like data to say how long each frame should last for and when to stop running. Is a GIF software? Is the basic circle above software? How much code do you need before something becomes software?

Are SVGs Libraries?

Licences like the LGPL and MPL allow copyleft libraries to be integrated into non-free software.

A proprietary application could treat an SVG as a library by asking the SVG to render the output and then displaying that. A bit of a reach, perhaps?

What about embedded raster graphics?

Just to complicate things, an SVG can also contain raster graphics. That is, it is possible to embed a PNG, JPEG, or any other traditional image within an SVG.

In this case, the embedded image can be Creative Commons licenced because CC BY-SA is compatible with GPLv3.

When someone creates an adaptation of a BY-SA licensed work and includes it in a GPLv3-licensed project, both licenses apply and downstream users must comply with both licenses. However, Section 2(a)(5)(B) of BY-SA 4.0 allows anyone who receives the adapted material downstream to satisfy the conditions of both BY-SA and GPLv3 (i.e. attribution and ShareAlike) in the manner dictated by the GPLv3.

(Emphasis added.)

The barest of SVGs containing only an embedded image probably wouldn't count as software. But what if you started applying programmatic transformations to them? This SVG embeds an image and uses software to rotate it upside down.

 SVG<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64">
  <image x="0" y="0" width="64" height="64"
    transform="rotate(180)"
    href="data:image/png;base64,iVB…" />
</svg>

Is that enough code to count as software?

Wisdom of the Crowds

I conducted a rigorously accurate public survey. Here are the results:

Final Thoughts

Personally, I think SVGs are software. I understand the argument that they're suitable for Creative Commons, but I disagree with it. Even the simplest SVG is distributed in a way that its contents are executed by the computer.

While SVGs may be minified and stripped of comments, they still retain the essence of source code. I suppose you could try to obfuscate them, or package them up in a quasi-binary form, but I maintain the source is still viewable and editable.

If you choose to use a Creative Commons Share-Alike licence, it probably won't cause any harm. But given CC's reluctance to endorse its use on software, it probably makes sense to use a copyleft source-code licence.


Share this post on…

10 thoughts on “Which Copyleft Licence is Suitable for an SVG?”

  1. @Edent@mastodon.social I’ve never thought about this (and it reminded me that I once wrote a book on SVG back when I could understand technical things) [1]

    Being that is that what SVG is is a graphic description language, in a similar way to how what PostsCript™ is a page description language (and indeed they are highly similar, lots of PS was inherited into SVG, not fully or wholly, but it certainly informed it greatly) then I’d say whatever you do to a PS file in this respect, you’d do also to an SVG application (funnily they’re called ‘applications’ rather than a ‘file’ or anything like that, I though this was odd back at the turn of the century when I was chatting on the W3C mailing lists about it all, but that was long long before the notion of an ‘app’ or ‘application’ in the sense we know it).

    Would I say the same about PDF? Maybe. PDF itself in its original form was an ‘open’ format (in that it was owned by Adobe but was free to download the docs for and use). So maybe what you’d do to a PDF in this respect, you’d also do to an SVG.

    [1] https://www.amazon.co.uk/Foundation-SVG-Ian-Tindale/dp/1903450799

    Foundation SVG: Amazon.co.uk: Tindale, Ian, Frost, Jon: 9781903450796: Books

    Reply | Reply to original comment on toot.pikopublish.ing

  2. A clear parallel can be found in fonts and whether they are copyrightable and how to protect them. Matthew Butterick has a great analysis of this topic at: https://matthewbutterick.com/chron/the-copyrightability-of-fonts-revisited.html

    Typefaces aren't copyrightable, but some fonts have clear programmatic origins, and so that route has been tried to protect fonts from being freely used without the designer's consent. But (according to Mr. Butterick, a US lawyer), that would likely fail in the courts.

    So maybe not just relying on copyright (CC) is insufficient?

    Reply

  3. @blog @Edent either your question is trivially answered or virtually impossible. I'd say practically an svg is just an image. Whether you define your image programmatically, via blocky pixels or via decompression of the corresponding Kolmogorov representation does not really matter.
    On the other hand, what is information? What if i give you two random blobs of bits? What if one is a one time pad decrypting the other one, when XORed? What if i never tell you that?
    Information is always context dependent, and as such must be regarded in this context. Then your SVG is just a picture and should be treated like one.

    Reply | Reply to original comment on mathstodon.xyz

  4. This discussion reminds me of the idea of conceptual art, which Sol LeWitt defined as follows: "In conceptual art the idea or concept is the most important aspect of the work. When an artist uses a conceptual form of art, it means that all of the planning and decisions are made beforehand and the execution is a perfunctory affair. The idea becomes a machine that makes the art." So the instructions to build a work become the art themselves. Ultimately it becomes a problem in semantics, which can never be resolved. Instead perhaps we should look at the licenses themselves, and ask what actions they prevent if any, and how they are relevant to art.

    Reply

  5. The Creative Commons applies the same license to the SVG versions of their icons as they do to the other versions.

    Reply

  6. @Edent I agree. SVGs are _code_ because they tell the computer what to display, by _how_ to display it. e.g. draw a circle at this coordinate with this radius.

    Raster for example: its just pixel information which is not interpreted in any way, its just displayed as data.

    Similarly:
    - text file: just data.
    - epub or pdf? same data, but with _code_ to tell the computer _how_ to display it. So.. code.

    Reply | Reply to original comment on mas.to

  7. Well, SVG vector images are mostly declarative, using a markup language to define the shapes.

    But how about WMF (Windows Meta File)? It was a common vector format back in Windows 3.x; and AFAIK it was a sequence of commands to draw those images. Is that code? That is definitely not human-readable code, though.

    What about some kind of Logo source code that controls a turtle to draw shapes? Or how about PS files that can also run somewhat arbitrary code inside that virtual machine?

    And we can mostly convert formats to other formats. And we could consider raster images as images and not code. But how about X PixMap (XPM)? That format is literally a valid C code, but also an image.

    So, I don't have answers, only more questions to serve as food for thought.

    Reply

What are your reckons?

All comments are moderated and may not be published immediately. Your email address will not be published.

See allowed HTML elements: <a href="" title="">
<abbr title="">
<acronym title="">
<b>
<blockquote cite="">
<br>
<cite>
<code>
<del datetime="">
<em>
<i>
<img src="" alt="" title="" srcset="">
<p>
<pre>
<q cite="">
<s>
<strike>
<strong>

To respond on your own website, write a post which contains a link to this post - then enter the URl of your page here. Learn more about WebMentions.