Git Product home page Git Product logo

pdn-content-aware-fill's Introduction

pdn-content-aware-fill

A Paint.NET Effect plugin that replaces the contents of the selection with pixels that are the closest match to the areas outside the selection.
This is often called 'content aware fill'.

This plugin is based on the GIMP Resynthesizer plugin.

How to install the plugin

  1. Exit Paint.NET.
  2. Place ContentAwareFill.dll in the Paint.NET Effects folder which is usually located in one the following locations depending on the Paint.NET version you have installed.
Paint.NET Version Effects Folder Location
Classic C:\Program Files\Paint.NET\Effects
Microsoft Store Documents\paint.net App Files\Effects
Portable <Paint.NET folder>\Effects
  1. Restart Paint.NET.
  2. The plug-in will now be available as the Content Aware Fill menu item in the Selection category of the Paint.NET Effects menu.

License

This project is licensed under the terms of the GNU General Public License version 2.0.
See License.txt for more information.

pdn-content-aware-fill's People

Contributors

0xc0000054 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pdn-content-aware-fill's Issues

Crash when hitting cancel

I hit cancel and paint.net crashed with this error:

File: C:\Program Files\paint.net\Effects\ContentAwareFill.dll
      Name: ContentAwareFill.ContentAwareFillEffect
      Version: 1.4.3.0
      Author: null54
      Copyright: Copyright © 2020 Nicholas Hayes (aka null54)
      Website: https://forums.getpaint.net/index.php?showtopic=112730
      Full error message: PaintDotNet.WorkerThreadException: Worker thread threw an exception ---> System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'ContentAwareFillConfigDialog'.
   at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   at ContentAwareFill.Resynthesizer.Synthesize(Int32 pass, Func`1 abortCallback)
   at ContentAwareFill.Resynthesizer.ContentAwareFill(Func`1 abortCallback)
   at ContentAwareFill.ContentAwareFillEffect.OnSetRenderInfo(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs)
   at PaintDotNet.Effects.BackgroundEffectRenderer.ThreadFunction() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 268
   --- End of inner exception stack trace ---
   at PaintDotNet.Effects.BackgroundEffectRenderer.DrainExceptions() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 447
   at PaintDotNet.Effects.BackgroundEffectRenderer.Abort() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 404
   at PaintDotNet.Effects.BackgroundEffectRenderer.Start() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 352
   at PaintDotNet.Menus.EffectMenuBase.<>c__DisplayClass43_3.<RunEffectImpl>b__4() in D:\src\pdn\src\PaintDotNet\Menus\EffectMenuBase.cs:line 904

Operation performed twice

The tool performs the calculations and displays a preview.
Upon hitting "OK", the tool performs the calculation again, which can be time consuming on large images.

Wouldn't it be faster just to copy the bits?

Plugin can lock up Paint.net for a long period of time

Sometimes it takes an unexpectedly long time to update UI with "rendering", causing user (me) to think they missed the Apply button, clicking the button twice often locks up the system for more than a minute, sometimes several minutes.

The cancel button does nothing when the plugin is locked up, the plugin will then close immediately when it unlocks which is not quite what the user desired.

This lockup also happens when changing settings too quickly when the 'render automatically' option is selected.

Perhaps a "kill" button, or change behavior of the Cancel button to interrupt an unintentionally long render process?

Plugin crashes

Getting errors:

File: C:\Program Files\paint.net\Effects\ContentAwareFill.dll
      Name: ContentAwareFill.ContentAwareFillEffect
      Version: 1.3.0.0
      Author: null54
      Copyright: Copyright © 2018 Nicholas Hayes (aka null54)
      Website: https://forums.getpaint.net/index.php?showtopic=112730
      Full error message: PaintDotNet.WorkerThreadException: Worker thread threw an exception ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at ContentAwareFill.ContentAwareFillEffect.OnConfigDialogProgress(Int32 value)
   at ContentAwareFill.Resynthesizer.Synthesize(Int32 pass, Func`1 abortCallback)
   at ContentAwareFill.Resynthesizer.ContentAwareFill(Func`1 abortCallback)
   at ContentAwareFill.ContentAwareFillEffect.OnSetRenderInfo(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs)
   at PaintDotNet.Effects.BackgroundEffectRenderer.ThreadFunction() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 225
   --- End of inner exception stack trace ---
   at PaintDotNet.Effects.BackgroundEffectRenderer.DrainExceptions() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 418
   at PaintDotNet.Effects.BackgroundEffectRenderer.Abort() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 374
   at PaintDotNet.Effects.BackgroundEffectRenderer.Start() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 320
   at PaintDotNet.Menus.EffectMenuBase.<>c__DisplayClass42_5.<RunEffectImpl>b__5() in D:\src\pdn\src\PaintDotNet\Menus\EffectMenuBase.cs:line 1032

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.