Skip to content

An example Paint.NET Effect plugin that uses gmic-sharp-pdn

License

Notifications You must be signed in to change notification settings

0xC0000054/gmic-sharp-pdn-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gmic-sharp-pdn-example

An example Paint.NET Effect plugin that uses gmic-sharp-pdn.
This example adds the G'MIC water command to Paint.NET.

Menu location: Distort > GmicSharpPdn Example

Compatibility: 4.2.11+

Dependencies

This repository depends on libraries from the following repositories:

gmic-sharp-pdn, extends gmic-sharp for use with Paint.NET Effect plugins.
gmic-sharp, provides the .NET G'MIC wrapper that gmic-sharp-pdn uses.
gmic-sharp-native, provides the native interface between gmic-sharp and libgmic.

License

This project is licensed under the terms of the MIT License.
See License.txt for more information.

Native libraries

The gmic-sharp native libraries (GmicSharpNative*) are dual-licensed under the terms of the either the CeCILL v2.1 (GPL-compatible) or CeCILL-C v1 (similar to the LGPL).
Pick the one you want to use.

This was done to match the licenses used by libgmic.

Source code

Prerequisites

Building the plugin

  • Open the solution
  • Change the PaintDotNet references in the GmicSharpPdnExample project to match your Paint.NET install location
  • Change the GmicSharp and GmicSharpPdn references in the GmicSharpPdnExample project to match the location of those files
  • Update the post build events to copy the build output to the Paint.NET Effects folder
  • Build the solution

Build notes

This example project uses ILMerge.Fody to merge GmicSharp.dll and GmicSharpPdn.dll into the main plugin file (GmicSharpExample.dll) after the project is built.
This allows the final plugin to only require the GmicSharpNative* DLLs as external dependencies in the Paint.NET Effects folder.

ILMerge.Fody is configured in FodyWeavers.xml to only include the DLL files whose filenames start with GmicSharp, this stops ILMerge from including any Paint.NET DLLs that may be present in the output folder when merging.