Can't find any info on how to write a filetype plugin for Paint.net. I have found only visual studio template at http://forums.getpaint.net/index.php?/topic/7984-filetype-plugin-template-v20/page__p__121651&#entry121651
and small description at codeproject, but I don't understand all of the parameters of OnSave event handler, what is PaintDotNet.Surface and how to work with data stored there.
I've written a plug-in like this once. Forget about the template for a minute, you can do this from scratch.
Start by adding references to PaintDotnet.Base, PaintDotNet.Core and PaintDotNet.Data.
Next you'll need a class which inherits from the FileType class:
For example:
So, you inherit from FileType. In the constructor you specify what operations are supported (Loading/Saving) and which file extensions should be registered. Then you provide logic for both the Save and Load operations.
Basically that is all you need.
Finally you'll have to tell Pain.Net which FileType classes you want to load, in this case a single instance, but you could have more then one in a single library.
I hope this helps, let me know if you have questions. }