Jump to content

Rick Brewster

Administrator
  • Posts

    20,634
  • Joined

  • Last visited

  • Days Won

    376

Posts posted by Rick Brewster

  1. 16 hours ago, Ego Eram Reputo said:

     

    Seen the latest API documentation? https://paintdotnet.github.io/apidocs/api/index.html

     

    There are a great many effects you can access and chain together. For example, see https://paintdotnet.github.io/apidocs/api/PaintDotNet.Effects.Gpu.html

     

    There are also these effects: https://paintdotnet.github.io/apidocs/api/PaintDotNet.Direct2D1.Effects.html

     

    The effects you can chain together are Direct2D effects. You can write a Paint.NET effect (yes the term "effect" is overloaded) that chains them together, but you can't combine Paint.NET effects like that. But that shouldn't matter because all of the bulit-in Paint.NET effects are essentially UI wrappers for the Direct2D effects.

     

    The effects whose names begin with "Pdn" are the Direct2D effects that power the built-in Paint.NET effects that you see in the app menus.

  2. 10 hours ago, Ego Eram Reputo said:

    I haven't figured out how to poll the source pixel yet

     

    You can use Environment.GetSourceBitmapBgra32(), which will give you an IEffectInputBitmap<ColorBgra32>. Then call Lock() to get the IBitmapLock<ColorBgra32>(). Then use AsRegionPtr() to get it as a RegionPtr<ColorBgra32> which you can just index into, e.g. region[x, y]. Then just compare region[x, y].A == 255 to determine if it's opaque.

     

    Note that this works fine for querying the alpha channel, as the alpha channel is invariant with respect to color space (sRGB vs. linear scRGB vs. whatever other color profile they might have on the image!). If you want to query the RGB values, they won't line up with the color space you're using in the GPU effect, and it'll take some extra work to determine the right thing to do. So that's a topic for another time.

    • Upvote 1
  3. FWIW, the classic effect system is getting deprecated, and soon -- I strongly encourage you to switch to BitmapEffect or GpuEffect (or probably [PropertyBased]GpuDrawingEffect in this case). It's worth learning this now before you end up with effect code that you can no longer maintain (compile) when newer versions of Paint.NET are released. This deprecation is starting with v5.1, where the classic effect system will be marked with [Obsolete("...", false)] (compiler warning to not use it), and then in the next release (e.g. v5.2 or v6.0) it'll be [Obsolete("...", true)] (compiler error preventing you from using it).

     

    I'm happy to help with the conversion btw, just let me know what questions you've got!

  4. 14 minutes ago, Numero7 Mojeangering said:

    Please update your zip file such that it is not detected by chrome or windows as a virus.

    Works fine here.

     

    This plugin has been around for 16 years, so if your antivirus is just now detecting it as a virus then it's a false positive.

  5. So you want ... clipart?

     

    Just save selected "clips" into a specific folder, and then pin that folder to the Quick Access section of Explorer. Then use Layers -> Import From File, and/or drag-and-drop files from that folder into PDN when you want them.

     

    In any case, sorry but no -- I won't be adding this.

  6. On 3/23/2024 at 9:13 AM, Dan Colasanti said:

    My comment was in response to another comment

    Then why didn't you include that context? There was no way to know that you were "replying" to something else on the forum if you created a new post and didn't make any reference to the thing you were "replying" to.

     

    On 3/23/2024 at 9:13 AM, Dan Colasanti said:

    and what I was referring to is "literally" what toe_head2001 (Administrator) said here

    Then you are misunderstanding that comment. Nobody said digital signatures don't matter. @toe_head2001 said "you modified the file, which invalidates the signature, so what you're asking for isn't even possible and you shouldn't pursue a solution to it." That's just a dry statement of facts, not any sort of judgement.

     

    As far as we know that isn't even remotely the same situation you're in (modifying the MSI for whatever reason).

     

    Next time you post please include context so we can hopefully understand what you're asking.

  7. 17 hours ago, Billy Pilgrim said:

    Do I really have to subscribe to WinZip to download and use this effects package?

    What does WinZip have to do with anything? Windows can work with zip files natively 

     

    17 hours ago, Billy Pilgrim said:

    Paint.Net should have tools readly available to correct this kind of distortion.

    🙄 Then why don't you go write a plugin for what you want? 

×
×
  • Create New...