I’ve received a few inquires about the licensing for the sample code that I’ve presented in the “how to implement…” graphics articles. I thought it might be prudent to cover that here publicly.

The intent of the articles and sample code is to increase the public knowledge of how tools in bitmap editors work. It appeared to me that every author of a graphics editor had to go out and reinvent the wheel somewhat, simply because not all the basic tools were publicly documented. The sample code is intended not only to satisfy idle curiosity, but to improve graphics editors, specifically for the Mac. i.e. I’m hoping to see Mac graphics apps with these features, if they don’t have them already.

To that end, the license needs to be permissive, so that it can be used in a wide variety of applications.

Privately, I think of the sample code as public domain. Optimally, that’s how I’d want it. However, because of the copyright laws in the US, it’s very difficult to make it so.

Instead, I’ve chosen the MIT license, which will hopefully be lenient enough:

Copyright © 2007 Andrew Finnell

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the “Software”), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

If you’d like to use another license, just let me know. In general I grant permission to use the code in any application, whether it be open source or closed.

One final note: since I’m writing the articles with the hope that some of the tools will wind up in real applications, I’d like to know if they do. If you use some of the code here, I would appreciate it if you would shoot me an email letting me know. This isn’t required, but I would be grateful.