So, you want to learn how to write a plugin for paint.net--well, you're in the right place!
Getting Ready
The first thing you'll need to do is install* CodeLab:
Download CodeLab (English)
Download CodeLab (Russian)
*How to install plugins
You may need to configure your system for CodeLab.
When installed properly, you'll find CodeLab in the paint.net menu Effects > Advanced > CodeLab.
Tutorials
Now, here is a list of tutorials to get you started*:
Overview of how effects work
Simple plugins
Adding a UI to your effect
Creating complex effects
Odds and Ends
Moving beyond CodeLab to Visual Studio
- Using additional IndirectUI rules
- How to debug your plugin
Adding Help to your plugin
Working with extra surfaces
Working with Alpha
More Sample Code
Removing dividing lines from your Visual Studio based Paint.NET Plugin**
Adding Tabs to your Visual Studio based Paint.NET Plugin**
You may also want to read ReMake's "First Steps" tutorials where he leads you by the hand in making various plugins:
Lines/Grid
Saturation RGB
Neon Edges
Sponge
Sponge (v2)
Linocut
Color Sketch
Sharing Your Work
Once you have an effect working the way you want, and you'd like to share it with the other users of paint.net, simply follow these steps:
Compress the effect DLL file along with the install.bat file created by CodeLab into a ZIP file. You should find these files on your desktop.
Create a thread in the Plugins forum by pressing the Start New Topic button.
Fully describe your plugin and attach a few screenshots of what it does. Be sure to include the UI of your effect in the screenshots.
Attach the ZIP file to the post using the Choose File button followed by the Attach This File button.
If you choose to post your effect's CodeLab script (source code), be sure to paste your CodeLab script inside of a code block (Click the code button <>, select C#, and paste your code into the proper spot. Press the Insert into post button.)
Help
If you start writing a plugin and you get stuck, post your code in the Plugin Developer's Forum and someone will try and help you figure it out.
Just be be sure to paste your CodeLab script inside of a code block (Click the code button <>, select C#, and paste your code into the proper spot. Press the Insert into post button.)
Here is a general list of what is and is not possible when writing a plugin: http://forums.getpaint.net/index.php?/topic/14566-p
As you can see, plugins are flexible, but they can't do EVERYTHING. If you need more capabilities, maybe what you need is a macro recorder. Try this one: TinyTask. Or, if you're looking for a command line utility to manipulate .PDN files, try https://www.irfanview.com/ There is a plugin that allows it to view Paint.NET files.
What About FileType Plugins?
How to write a filetype plugin
*Those tutorials listed in Bold have been rewritten for CodeLab v6.0!
**These tutorials are for Paint.NET v5.0+ plugins