Jump to content
How to Install Plugins ×

Content Aware Fill (2023-04-30)


null54

Recommended Posts

Rick just needs to add multi-level Repeat to the Effects menu. Rather than just repeating the last effect, have 3-5 listed there that you can pick from.

 

Handy addon!

Link to comment
Share on other sites

  • 2 months later...

I've been playing with it a little lately in both PDN and Gimp and noticed that the Gimp plugin usually gives me better results and is also significantly faster, especially on large images.  Given that it is basically the same algorithm, I wonder what may cause it.

Link to comment
Share on other sites

7 hours ago, alexo said:

I've been playing with it a little lately in both PDN and Gimp and noticed that the Gimp plugin usually gives me better results and is also significantly faster, especially on large images.  Given that it is basically the same algorithm, I wonder what may cause it.

 

I do not know.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • 3 months later...

Hello @jts25 and Welcome to the forum :)

 

I am guessing that you have probably downloaded The Source Code, instead of the actual Zip file - which is denoted with a paper clip above the Source Code link.

 

1.  Unzip the file and you will find instructions to put the .dll into the Paint.net Effects folder.

30b8T8B.gif

How I made Jennifer & Halle in Paint.net

My Gallery | My Deviant Art

"Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon.

 
Link to comment
Share on other sites

  • 2 months later...

MASS props to @null54 for this one... i wish i'd looked for this sooner, but i thought "naaaah, no one's developed it... and if they have, it won't be that good."  i was MORE than satisfied w/ the results on my first try, can't wait to mess around w/ it some more.  attaching what you helped me accomplish... you ROCK @null54!!

\m/ (^_^) \m/

ContentAwareFillExample-web.jpg

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
  • 6 months later...
2 hours ago, LoudSilence said:

Is it just not possible and im forced to use stamp tool?

 

Unfortunately, this is correct.

The algorithm the plugin uses sample pixels from all sides of the selection, so it will not work with a selection on the edges of an image.

 

  • Like 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

Yep, that's because the algorithm isn't exactly "content-aware" as AI version goes technically. It is what it is though. I don't see this changing any time soon.

G'MIC Filter Developer

Link to comment
Share on other sites

I understand and respect this, coding is hard, but in the meantime, could you put an error that says that it cant be at the edge rather than the error i got? its a false error.

Edited by LoudSilence
Link to comment
Share on other sites

  • null54 changed the title to Content Aware Fill (2020-09-02)
5 hours ago, LoudSilence said:

I understand and respect this, coding is hard, but in the meantime, could you put an error that says that it cant be at the edge rather than the error i got? its a false error.

 

That error is now fixed.

The plugin will now work with selections at the edge of the image, as long as there is still an unselected area in the image.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

Release version 1.4.1.

Changes:

 

Improved the plugin closing speed when pressing Ok after the preview rendering has finished.

  • Upvote 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

Hi @null54

 

Upon second attempt of using plugin I get this error:

 

Spoiler

File: C:\Program Files\paint.net\Effects\ContentAwareFill.dll
      Name: ContentAwareFill.ContentAwareFillEffect
      Version: 1.4.1.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.NullReferenceException: Object reference not set to an instance of an object.
   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 267
   --- End of inner exception stack trace ---
   at PaintDotNet.Effects.BackgroundEffectRenderer.DrainExceptions() in D:\src\pdn\src\PaintDotNet\Effects\BackgroundEffectRenderer.cs:line 458
   at PaintDotNet.Menus.EffectMenuBase.DoEffect(Effect effect, EffectConfigToken token, Result`1 lazySelectionScans, Result`1 lazyRegionToRenderScans, Result`1 lazyClipMaskRenderer, Surface originalSurface, Exception& exception) in D:\src\pdn\src\PaintDotNet\Menus\EffectMenuBase.cs:line 0

 

Should be easy to replicate. It is consistent.
 

  • Like 1

PaintNetSignature.png.6bca4e07f5d738b2436f83d0ce1b876f.png

Link to comment
Share on other sites

Thank you so very much for this plugin!  This is a godsend and I've very happily donated for it!  My only disappointment is that I didn't find it earlier! 

 

I'm (at best) a beginner-level paint.net user and I really only use the program when I wish to make some sort of change to an existing image - usually a photo (honestly, I feel more comfortable with it than with Photoshop Elements).  Those opportunities don't arise very often, so I usually end up having to "re-learn" what I have forgotten -- but that's OK. 

 

This time, I wanted to "improve" a photo I had taken many years ago when my daughter graduated from college.  I wasn't able to get close enough at that time, so I wanted to crop and clean it up a bit.  However, when I finished cropping, I found that a balding head in front of a man's faintly striped suit stuck out as a huge distraction.  So I wanted that head removed and replaced with the "suit fabric".  This was something I'd never tried to do before and didn't know how, so I came here and found the 2010 post about "The Subterranean Copy/Paste Blues".  I followed those instructions (which required me to learn new information about dealing with layers and using other features I hadn't tried before) and -- after quite a bit of time (including making lots of mistakes along the way) I finally felt I had accomplished my goal. 

 

Proud of myself, I returned to that post to finish reading others' comments.  Of course, the very last of those comments directed me here and then I couldn't resist downloading and trying THIS plugin to do the same chore.  When I used THIS plugin, I was delighted that I could do the same "fix" at least as well in only a fraction of the time.  Although I can see a few very subtle differences in the final product produced by this plugin vs. the much longer process I used the first time, I believe the result using this plugin is the more pleasing of the two.   

 

I didn't include copies of the images because each of them is at least twice the specified 256kB "Max total size" limit, so I guess you'll just have to take my word about the comparison <g>!  

 

Thanks again for this really great tool!  

 

Paul

Link to comment
Share on other sites

  • null54 changed the title to Content Aware Fill (2020-09-07)
6 hours ago, AndrewDavid said:

Upon second attempt of using plugin I get this error:

 

Fixed in version 1.4.2.

  • Like 3
  • Upvote 2

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

Is it possible to add a setting or change the behavior of the slider?

I would like the effect to start working on the preview once I release the slider not while I am still moving it (it results in many attempts in a large image from when I start sliding it to when I finish sliding it), if you could change the behavior to start working once you release the slider the plugin UI would be more responsive.

Link to comment
Share on other sites

On 6/4/2018 at 5:40 PM, null54 said:

The effect renders automatically because that is the expected behavior for all Paint.NET effects that do not show their own drawing surface.

If I were to add an apply button it would be controlled by a checkbox that disables the automatic rendering.

@arana If you scrolled up, you would see that someone else asked the same question. This checkbox isn't added yet, and probably wont anytime soon.

Link to comment
Share on other sites

  • null54 changed the title to Content Aware Fill (2020-09-10)
14 hours ago, arana said:

Is it possible to add a setting or change the behavior of the slider?

 

Added in version 1.4.3.

 

Release version 1.4.3.

Changes:

  • Added high-DPI icons
  • Allow the configuration dialog automatic rendering to be disabled
  • Like 2
  • Upvote 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • 3 months later...
On 9/9/2020 at 10:43 AM, LoudSilence said:

@arana If you scrolled up, you would see that someone else asked the same question. This checkbox isn't added yet, and probably wont anytime soon.

If you had read carefully you will notice It is not the same question, in fact the previous is not even a question, user says it is an inconvenience to him, not asking anything about it except after his second reply asking if THERE WAS a DRAFT quality setting, mine is a question asking if it is possible to change the slider behavior, so no not same question at all, as the answer given to him does not answer mine, also you say it was not added, mr obvious if it was already added I would have not asked if it was possible to add it.

 

btw the developer did a great work and in fact added a checkbox with no apply button so took both requests and solved with a single bullet.

THANK YOU @null54

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...