I'm giving myself a headache just thinking about this, so would appreciate anyone else with an opinion.
First, off, a note: I'm absolutely aware that my current code is a 'derivative work' - That's not in question. The implications of this are giving me a headache though.
The situation is as follows: I wanted to parse TGA images into a .Net bitmap. I did some digging, and came up with the following code: http://www.codeproject.com/Articles/31702/NET-Targa-Image-Reader
This is covered under the CodeProject open-source license. I then took the original code, and re-wrote completely, thus creating what I'm reasonably certain at this point is a derivative work.
I then started thinking about the implications of the licensing.
TGA is a fixed file format, with a standard specification.
In order to parse this, you need to read the footer first to determine the version plus various offsets, then the header & extension tables, followed by the image data itself.
Using standard C# tools, I can't see any 'other' easy ways to do this than the standard BinReader.
I can juggle around the order things are called in, but ultimately assuming that any given image conforms to the specifications laid down by Truevision ( http://www.dca.fee.unicamp.br/~martino/disciplinas/ea978/tgaffs.pdf ) , the number of bytes needed to be read can always be determined programatically, and will never be different.
Does this mean that any TGA parser I write is now 'contaminated' by CodeProject license, as I've gained knowledge from it, or have I just opened a can of worms?