-
Posts
1,592 -
Joined
-
Last visited
-
Days Won
28
Posts posted by AndrewDavid
-
-
@Rick Brewster Somethings wrong
-
@Rick Brewster Almost missed this update - so wrapped up in the template walkthrough.
After updating - I can attest to the speedier loading of the plugins. Doc loading is faster too
-
1
-
-
17 hours ago, mackenzieh said:
I will try downloading it from the plugin index again and see if it comes up.
The plugin index will take you to the first page that shows the old version as 4.3 has not been released. You need this version
which you will find at the end of the thread. Version 1.3.9.2 is what you are looking for.
-
1
-
-
@Rick Brewster Well done on the fixes.
"I can barely see anything in that screenshot/picture"
My upload size is limited. No big pictures. 😊
-
1
-
-
As I am seeing. Little things create big problems. Programming is no easy task.
-
Confirmed
SpoilerException details:
System.ArgumentException: The path is empty. (Parameter 'path')
at System.IO.Path.GetFullPath(String path)
at System.Diagnostics.FileVersionInfo.GetVersionInfo(String fileName)
at PlugInData.PluginInfo..ctor(IEffectInfo effectInfo, Int32 index)
at PlugInData.PluginInfoCollection..ctor(IEnumerable`1 effectInfos)
at PlugInData.PBDialog.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at PaintDotNet.PdnBaseForm.WndProc(Message& m) in D:\src\pdn\src\Core\PdnBaseForm.cs:line 1949
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, WM msg, IntPtr wparam, IntPtr lparam) -
Here I have problem with a simple solution you can find I'm sure.
I decompiled a small outdated plugin AdvGrey.dll to try and build it in VS2022 Preview Net 5.0 from the beginning.
One error has stumped me in the code.
Spoilerusing System.Drawing;
using System.Reflection;namespace PaintDotNet.Effects
{
[EffectCategory(EffectCategory.Effect)]
public class UserScript : Effect
{
private int Amount1 = 100;
private int Amount2 = 100;
private int Amount3 = 100;
private EffectConfigDialog threeAmountsConfigDialog;
private object selection;
public string Amount1Label { get; private set; }
public string Amount2Label { get; private set; }
public string Amount3Label { get; private set; }
public string Amount4Label { get; private set; }
public int Amount1Minimum { get; private set; }
public int Amount1Maximum { get; private set; }
public int Amount1Default { get; private set; }
public int Amount2Minimum { get; private set; }
public int Amount2Maximum { get; private set; }
public int Amount2Default { get; private set; }
public int Amount3Minimum { get; private set; }
public int Amount3Maximum { get; private set; }
public int Amount3Default { get; private set; }public override void Render(EffectConfigToken parameters, RenderArgs dstArgs, RenderArgs srcArgs, Rectangle[] rois, int startIndex, int length)
{
for (int i = startIndex; i < startIndex + length; i++)
{
}
}
[System.Obsolete]
public UserScript()
#pragma warning disable CA1416 // Validate platform compatibility
: base("Advanced Greyscale", new Bitmap(Assembly.GetExecutingAssembly().GetManifestResourceStream("ico.png")), isConfigurable: true)
#pragma warning restore CA1416 // Validate platform compatibility
{
}
public override EffectConfigDialog CreateConfigDialog()
{
{
Amount1Label = "Red";
Amount1Minimum = 0;
Amount1Maximum = 100;
Amount1Default = 100;
Amount2Label = "Green";
Amount2Minimum = 0;
Amount2Maximum = 100;
Amount2Default = 100;
Amount3Label = "Blue";
Amount3Minimum = 0;
Amount3Maximum = 100;
Amount3Default = 100;
Amount4Label = "Advanced Greyscale";
};
return threeAmountsConfigDialog;
}
private void Render(Surface dst, Surface src, Rectangle rect)
{
Rectangle boundsInt = EnvironmentParameters.GetSelectionAsPdnRegion().GetBoundsInt();
for (int i = rect.Top; i < rect.Bottom; i++)
{
for (int j = rect.Left; j < rect.Right; j++)
{
if (boundsInt.IsVisible(j, i))
{
ColorBgra colorBgra = src[j, i];
byte r = colorBgra.R;
byte g = colorBgra.G;
byte b = colorBgra.B;
byte a = colorBgra.A;
float num = (float)Amount1 / 100f;
float num2 = (float)Amount2 / 100f;
float num3 = (float)Amount3 / 100f;
num *= (float)(int)r;
num2 *= (float)(int)g;
num3 *= (float)(int)b;
float num4 = Amount1 + Amount2 + Amount3;
num4 /= 300f;
float num5 = (int)(byte)((num + num2 + num3) / 3f);
num5 /= num4;
byte b2 = (byte)num5;
colorBgra = (dst[j, i] = ColorBgra.FromBgra(b2, b2, b2, a));
}
}
}
}
}
}The only error I get is for the underlined IsVisible extension method found at line 67
Its such a small plugin, I don't know how it could stump me. The code is contained in the old DLL and works fine in Paint.net. Upgrading it to Net 5.0 showed what has been depreciated and I was able to fix all errors except this one. Could you please help? -
Open any image
Reduce transparency to 50% by Adjustments/Transparency (Boltbait's plugin)
Set brush size to 20 /100% Hardness
Color Black 0,0,0,255
See what happens;
2 things
outside 20 diameter
maybe 90% erasure.
quick fix I'm sure
-
@toe_head2001 thanks for having a look. More lessons learned
Anything else I can chew?
-
Hi Martin
I've been a fan of your plugins for awhile and just realized the name change. For your info, I'm starting to learn how to use VS2019 to create plugins. Create is not really the right word, recover would be better. I have the beta version of Paint.net installed and working on modifying some old plugins to learn VS. Your PdnPropertiesAndControls provided me with a valuable learning experience that I used to rebuild your plugin. I hope you don't mind my posting to GitHub for reference purposes. https://github.com/AndrewDavid007/PdnPropertiesAndControlTypes. It's too bad not every plugin is in GitHub.
-
1
-
-
It does say create addons and extensions (which I have no plans on doing) which is why it wasn't installed. Once installed, still no config manager. I'll just continue downloading until I get it.
40 minutes ago, toe_head2001 said:sounds like you keep biting off more than you can chew.
I have time to learn.
41 minutes ago, toe_head2001 said:I have no idea what you're talking about with the Configuration Manager.
Do you see it? I may have to build it as a custom tool.
-
Configuration Manager in Visual Studio 2019?
I attempted to make the changes in the previous post to update the template for Core 5.0. No easy task. I tried editing the code with Visual Studio Code but when I opened the Project in Visual Studio it prompted me to open the Configuration Manager. Microsoft Docs describes how to activate Configuration Manager but my installation is missing the described menu entry. "Show advanced build configurations" does not exist. I did try another approach by building the template from a new project, but when copying the code into the new project, there were too many errors generated (not because of lack of references). Seems Core 5.0 is a whole new language.
-
I would like to go back to the list of broken plugins and remove all the lines over plugins that are still not operating at 100%.
When and if you release the next update, users will need to know what no longer works. I can think of 3 categories. 1. Broken - Will not load/crashes Paint.Net.
2. Fixed - Will run but at reduced capability/new version may or may not needs to be downloaded. (Like CircularText) 3. Fixed to full functionality/Download required. (Like Plugin Browser). Red/Yellow\Green markers. Maybe the text if the software will allow, Thoughts?
-
CircularText.DLL
Uploaded another broken plugin to GitHub. This is one that would not load in the new beta version. It loads fine now but still has the menu problem. Different error as well.
It will load but not save.
7 hours ago, Rick Brewster said:Something in XmlSerializer (part of the framework) may have changed?
That ball is in your court. The headache of updating software. The plugin still works, just lost some of its functionality.
-
Hi @Echo Welcome to the Forum
Another suggestion
https://forums.getpaint.net/topic/108312-trs-monolithic-3d-text-generator-feb-26-2019/?ct=1630138324
Let us know which one you choose.
-
https://forums.getpaint.net/topic/111330-unfinished-plugins/page/6/
After building JustifyText I see no problem using ILSpy.exe. I didn't need any assistance for that one. (After finding a message you wrote along time ago). At least that's one app I understand. I'll try your suggestion and see if its any better. I think these plugins were built in codelab. Decompiling them for Visual Studio is the challenge.
-
30 minutes ago, toe_head2001 said:
Where on the forum can I find this plugin? I can't find it in the plugin index.
Buried in Unfinished plugins
30 minutes ago, toe_head2001 said:What tool are you using for de-compilation?
ILSpy.exe
-
JusttifyText.DLL
Uploaded another broken plugin to GitHub for determining what is causing the failure of the plugin's menu attempt to save/load files. Definitely need help for this one.
I can't even find the source code for that functionality. I have been able to create the DLL correctly, I have updated it to run on net5.0-windows and hope you can resolve this loss of functionality. There are about six more plugins that fail in the same manner, so I hope when we determine the correct code for this one, it can be applied to the others.
This is the error
-
I was able to build the dll so I don't think it's an issue anymore.
-
CustomFrame.DLL
There was a resource file under selectframe.cs / (I deleted it too but I think I still need it)
Followed your suggestion and found the resource file the decompiler created. I must of added it to selectframe.cs in error (I do make mistakes)
I learned there is a big difference between copying and pasting and or Add new/existing item to a project.
And now the good news
It successfully built the dll that now runs in Paint.net
It doesn't do what the old plugin did so I'm not out of the woods yet. From what I remember, you could open a premade png file to create the custom frame.
Although working, it doesn't give that option. I've pushed the changes to GitHub and await your thoughts on this matter.
This is where Selectframe.cs comes in. I think that was the functionality it provided.
-
On 8/25/2021 at 8:52 AM, Rick Brewster said:
so I should be able to figure it out
Another challenge for you. Does this look like something you can figure out?
SpoilerSeverity Code Description Project File Line Suppression State
Warning MSB3277Found conflicts between different versions of "WindowsBase" that could not be resolved.
There was a conflict between "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "WindowsBase, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35".
"WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" was chosen because it was primary and "WindowsBase, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" was not.
References which depend on "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" [C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\5.0.0\ref\net5.0\WindowsBase.dll].
C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\5.0.0\ref\net5.0\WindowsBase.dll
Project file item includes which caused reference "C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\5.0.0\ref\net5.0\WindowsBase.dll".
C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\5.0.0\ref\net5.0\WindowsBase.dll
References which depend on "WindowsBase, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" [].
C:\Program Files\paint.net\PaintDotNet.Base.dll
Project file item includes which caused reference "C:\Program Files\paint.net\PaintDotNet.Base.dll".
PaintDotNet.Base
PaintDotNet.Effects
PaintDotNet.Core
PaintDotNet.Data
PaintDotNet.Resources
C:\Program Files\paint.net\PaintDotNet.Core.dll
Project file item includes which caused reference "C:\Program Files\paint.net\PaintDotNet.Core.dll".
PaintDotNet.Core
PaintDotNet.Effects
PaintDotNet.Data
C:\Program Files\paint.net\PaintDotNet.Framework.dll
Project file item includes which caused reference "C:\Program Files\paint.net\PaintDotNet.Framework.dll".
PaintDotNet.Effects
PaintDotNet.Data
C:\Program Files\paint.net\PaintDotNet.SystemLayer.dll
Project file item includes which caused reference "C:\Program Files\paint.net\PaintDotNet.SystemLayer.dll".
PaintDotNet.Effects
PaintDotNet.Core
PaintDotNet.Data
PaintDotNet.Resources
C:\Program Files\paint.net\PaintDotNet.SystemLayer.Native.x64.dll
Project file item includes which caused reference "C:\Program Files\paint.net\PaintDotNet.SystemLayer.Native.x64.dll".
PaintDotNet.Effects
PaintDotNet.Core
PaintDotNet.Data
PaintDotNet.Resources
CustomFrame
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 2203Could it be a bug in Visual Studio? I'm adept at generating error messages
-
@midora Thanks for the help. Overnight @toe_head2001 made a few changes and I just added another one to GitHub.
When you say "build it" do you mean build the project file? The current issue is trying to get the dll to work. Have you been able to successfully debug it?
The current error I am getting is;
SpoilerException thrown: 'System.Resources.MissingManifestResourceException' in System.Private.CoreLib.dll
An exception of type 'System.Resources.MissingManifestResourceException' occurred in System.Private.CoreLib.dll but was not handled in user code
Could not find the resource "CustomFrame.Properties.Resources.resources" among the resources "" embedded in the assembly "CustomFrame", nor among the resources in any satellite assemblies for the specified culture. Perhaps the resources were embedded with an incorrect name.That's where I am stuck. When debugging, it gives that error on line 18 of EffectPlugin.cs
I didn't think rebuilding an old plugin would be so difficult. But it is a good learning experience.
Any help you can provide in debugging this would be greatly appreciated. No reason why you can't join us on GitHub as well.
-
Still no help. Perhaps you have some tools installed that I don't. Double clicking on it just takes me to the resource file and highlighting "Resource".
Error still exists
SpoilerMessage=Could not find the resource "CustomFrame.Properties.Resources.resources" among the resources "" embedded in the assembly "CustomFrame", nor among the resources in any satellite assemblies for the specified culture. Perhaps the resources were embedded with an incorrect name.
I'm officially stuck
-
Well the debugging is going well. First of all this is the error message from paint
SpoilerSystem.Resources.MissingManifestResourceException
HResult=0x80131532
Message=Could not find the resource "CustomFrame.Properties.Resources.resources" among the resources "" embedded in the assembly "CustomFrame", nor among the resources in any satellite assemblies for the specified culture. Perhaps the resources were embedded with an incorrect name.I also see a problem related to icons. The project is looking for the .png files I think. In what folder should they be placed? Is there a naming convention I have to follow?
If that's the case or do I need to do something else.
When I debug it stops at line 18 in EffectPlugin.cs
18 public static Bitmap StaticIcon => Resources.cficon;
Baby steps. You did not answer my questions about GitHub. Or do I have to get all the bugs worked out?
paint.net 4.3 alpha build 7921
in Preview Center
Posted
@Rick Brewster Now I am having big trouble getting paint to run. I was using it all morning (at least 2 hours). When you asked for the trace, I rebooted to get a fresh start.
After searching for the trace command, I had trouble getting it to work. It finally took - started paint, but all I saw was the little blue circle, and the app not responding message. I was able to close it clicking on the X button. Got the normal program not responding/report to Microsoft message and cancelled out back to the desktop.
Rebooted - Tried to restart paint - no luck - just the blue circle after clicking on effects.
Uninstalled and installed previous beta version - still no luck - just the blue circle after clicking on effects.
Now I have uninstalled that version and debating what to do next.
I do recall having trouble getting that trace to work. I know its just a switch and shouldn't damage the installation, but something corrupted something.
I'll do a SFC and get back to you.