Opinions on Code Licencing

Hello scripters,

I’ve not really seen (or had) much discussion about licensing of ImageJ scripting (whatever programming language you use) in the context of personal provision or public sharing of scripts.

When I write scripts / code for an end user, I usually add a CCBY licence and indeed everything on my public repos shares the same licence.

How do people feel about Non-commercial / Share-alike clauses or other types of licence (interesting article on problems with SA here ).

Related question: If I commit code to github (or similar) with a CCBY licence, then commit changes with a more restrictive licence (say, a CCBY-NC), is use of the old commit as CCBY fair game?

I ask because addition of a README and licence is usually the last thing I do before pushing to a remote. Should it be the first?

Look forward to hearing your thoughts!


Hi @dnmason,
Creative Commons actually discourages people from using their licenses for software: See here:

We recommend against using Creative Commons licenses for software. Instead, we strongly encourage you to use one of the very good software licenses which are already available. We recommend considering licenses made available by the Free Software Foundation or listed as “open source” by the Open Source Initiative.

If you want to prevent people from “stealing” your code by without giving back changes they made, you should look at the GPL3 license. The webpage choose a licence has an overview over popular software licenses and their specifics.

Yes as that code was made available under the other license. Additionally I think CCBY-NC makes little sense for software in my eyes as “comercial use” is difficult to define in that case.

Probably, you can always start with a more strict license (e.g. GPL3+) and change the license at a later point in time to be more permissive.


Thanks for the comments and really interesting points! I guess the principal concern is acknowledgement (the CCBY-NC was just used as an example, not a realistic choice). Personally, I’m unlikely to use the GPL3 licence given the remixing problems of CCBY-SA mentioned above.

For me, a project often starts as bits of code in a private repo that I never expect to share so it seems overkill to me to add a licence to everything just in case. If this were a real concern, I think the answer (in some ways sadly) would just be to not push the entire git history to the public repo (maybe this is how most people operate, I’m relatively new to git).

1 Like

Yes, usually you clean up everything, add the license file and then publish.

Personally, I add a license ASAP to everything I do, and everything I do is public by default. I use permissive licenses (e.g. BSD-2 or ISC or MIT) unless I have a compelling reason to do otherwise. I only leave something private for legal or security reasons (e.g., secret tokens or passwords). And in those cases, I encapsulate the smallest possible piece of “infected” code that must remain secret, and make the rest public.

Reasons to use a copyleft license like GPL include:

  • A dependency is copyleft, and thus the downstream code also must be so.
  • You want to enable a dual-licensing model—see e.g. Bio-Formats, which uses a dual GPL/commercial license. In this way, open-source projects can use the copyleft license, while commercial projects can purchase a commercial license. This only works if all copyright holders continually agree to make the software available under both licenses, though.
  • You agree with Richard Stallman about pragmatic idealism.

Personally, generally speaking, I lean more and more toward the minimal copyright restrictions possible; I would love to make everything we do public domain if possible with something like the Unlicense, but there are legal reasons that doing so is generally impossible when you work for an institution rather than yourself.

A major reason I like to minimize restrictions is because I want to maximize the impact and utility of my work. If my work is GPLed, then many companies cannot adopt it and will instead rewrite. Similarly, permissive projects such as ITK cannot adopt or port GPLed work, and instead will choose to rewrite it. My feeling is: I do not want to waste my life releasing a thingamabob only to have someone else rewrite it for legal reasons.

As a counterpoint: I have had long philosophical debates with others who disagree with me about permissive licensing being the best way to maximize impact. Such people feel that copyleft will have a greater total impact over the long term. Ultimately, I do not think this is an trivial argument to make in either direction.


Thanks for the reply @ctrueden, really helpful!

How did you go about getting permission from your University (or technology transfer office or similar)? Did they give you a list of permissible licenses?

@nicost Is your question aimed at me? As in: how did I get permission to use the licenses that we use?

In general, such permission is not needed at the University of Wisconsin. Here are some resources which describe the UW’s policies surrounding production of computer software:

Reading over the “Computer Software Ownership” section in particular, the copyright situation is more nuanced than simply “the UW Board of Regents owns the copyright.” It is more correct to state that I (co-)own the copyright for projects I have (co-)produced, since they were written as part of “individual scholarship” rather than being specific conditions of my employment (i.e., “work for hire”). Either way, though, the people who are active on the project have the authority to make legal decisions about the project such as whether to change the project license(s).

The most important point is that the UW actively strives to encourage dissemination and reuse. To quote the “Computer Software Ownership” article:

The primary objective of policies concerning ownership of intellectual property must be to preserve, protect and foster the open and creative expression and exchange of information, ideas and research results. … Although governmental agencies and most businesses assert ownership of the intellectual property created by their employees, the University of Wisconsin System has not typically done so. Such ownership provides the opportunity to withhold as well as disseminate. Ownership of intellectual property by the University would provide a general right, and perhaps a responsibility to censor; this runs counter to the University mission to engage in open innovation and inquiry. Individual ownership is also more consistent with the self-directed nature of much university work and of Wisconsin traditions in particular. … ownership at the University is normally vested in the creator.


Nice! Very positive approach by your University. UCSF was not like that in the past, but this is a nice prod to re-visit licensing with them.


Hi all,
I am a bit confused of how to deal with licences especially for dependencies.

Let say I made a Fiji plugin that has a dependency under a GPL licence. I used some functions of the dependancy as such and did not make any modifications of it.

  1. Can I use a different licence for my plugin, provided I mention the GPL licence for this dependancy ?

  2. Is there some kind of “open-source use for free, commercial upon authorisation” like the CC-BY-NC ? I guess that’s the dual-licencing option. But can I adopt this option if a dependency is GPL ? And is it possible with Fiji at all (ther are some commercial plugin so I guess yes) ?

Thanks !

No. If you depend on a GPL component, your project must also be GPL. That is why some people refer to it as a “viral” license.

Note that by definition, a single software license that forbids commercial use is not an open-source license. See the Open Source Definition for details. CC-BY-NC is not an open-source license.

Dual licensing can be one way to achieve your goal here. For example, the Bio-Formats project uses this approach: the formats-gpl component (which is what provides most of the proprietary file format reader implementations) is licensed according to the GPL, meaning that anyone can use and/or modify it as long as their code is also licensed under the GPL. But there is also a commercial licensing option, for projects wishing to depend on Bio-Formats without licensing their code as GPL. See the OME Licensing page for details.

However, this dual-licensing approach only works if you have the rights to offer the software under a commercial license. But if your plugin uses formats-gpl, your code must also be released under the GPL. I am not a lawyer, so my understanding gets murkier here, but I believe that you could provide a commercial license to your plugin excluding Bio-Formats but then anyone licensing your project would also need to purchase a commercial Bio-Formats license as well in order for your program to do anything relying on it.

Here is an article that goes into more detail about your line of questioning:



Hi Curtis, @iarganda

Do you have opinions about the LGPL license?

It is used, e.g. here:

The LGPL looks kind of sensible to me, because it seems to enable companies to use the code and still sell their products, but at the same time “encouraging” somewhat being open-source, at least for that particular piece of code. But frankly, I am not sure I really understand it and the implications…

The famous article from GNU discussing it is here:


Personally, I like the LGPL OK. But it really depends on what you are trying to accomplish with your component. In practice, I think it rarely results in code being contributed back to the OSS project, especially for projects written in languages like Java and Python that are very easy to extend without modifying the component source itself. Bug-fixes, maybe.

1 Like

What about scripts? Are these too small to be considered for licensing? Most of the work I do invves a few hundred lines of code to tackle a rather specific problem that should get published along with the actual paper.

So far we were not using any license, just mentioning authorship…


I almost always put a BSD3 header on top of macros and scripts when I deliver them to collaborators. With that I allow them to publish the script… They don’t have to ask me if it’s ok or so :wink:


This brings up a question related to the forum. If users provide code snippets here on image.sc, are they automatically under a specfic license?

There is something under https://forum.image.sc/tos#3 but I can’t see how that relates to the license under which I can re-use such code snippets.


@VolkerH I’m not sure if I got your question right.

IMHO any content is public domain per default. Public domain means: do whatever you feel like. If you define a code snipped to be CC 4.0 CY NC or BSD3 or whatever, than this has higher priority and should be respected.

Eventhough it is common practice to reuse pieces of code found here and there unlicensed, I recently attended some talks about licencing and if no licence is mentioned then legally speaking you are not allowed to use the code (or the production whatever it can be) :sweat_smile:
This is especially true for companies, which don’t want to take any legal risk.

But in practice I agree that It should rather be public domain by default, and I think that it is rather complicated for someone to claim some “unauthorized” reuse of its code if this person did not licenced it in the first place. You just don’t put it online in this case :sweat_smile:


While this is true in general for work with no specified license, it doesn’t apply to user contributions on the forum, since it’s clearly stated in the Terms of Service linked by @VolkerH above:

User contributions are licensed under a Creative Commons Zero (public domain) license


Was the Creative Commons Zero term already there in the terms of service when I linked to it.
I must have been blind when I posted the answer to my question without noticing.
So with the CC Zero I seem to be covered when using code snippets on the forum, provided it seems reasonable to assume that the poster wasn’t copy&pasting code from somewhere else.

Maybe I got confused because around the time I posted to the thread here I also wondered about what the situation is like with stack overflow. There, the written text of the answers is under some Creative Common License but I thought the code is under MIT license because I only read the bold text here:

without reading their update (a link near the top) which takes back some of the statements.