Jump to content

otuncelli

Members
  • Posts

    292
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by otuncelli

  1. It can be done by adding people under Settings -> Collaborators section. Insights tab is for statistics about your repository which most functions are only available to GitHub Pro users for private repositories.
  2. You need to derive your plugin class from FileType or PropertyBasedFileType or FileType<TToken, TTWidget> and implement IFileTypeFactory or IFileTypeFactory2 (newer, recommended) interfaces. Derive from FileType if you don't need to show any settings on Save dialog, Derive from PropertyBasedFileType if you need to show settings on Save dialog using paint.net's internal controls, aka "IndirectUI", Derive from FileType<TToken, TTWidget> if you need to show settings on Save dialog using your own controls You need to implement your own dialog and controls if you need to show settings when opening a file (in OnLoad method). This isn't something supported officially but possible. A very simple implementation that derives from FileType: https://github.com/PsdPlugin/PsdPlugin/blob/master/PhotoShopFileType/PhotoshopFileType.cs The code I've posted should go into the Document OnLoad(System.IO.Stream input) method. You create the document using the input stream, return it and then paint.net opens it. Also @null54 has lots of open source file type plugins. They helped me a lot when learning stuff. https://github.com/0xC0000054?tab=repositories&q=paint.net+filetype
  3. Sure. using PaintDotNet; ... ... // surface contains the pixel data Surface surface = new Surface(width, height, SurfaceCreationFlags.DoNotZeroFillHint); // add your surface to a layer BitmapLayer layer = new BitmapLayer(surface, takeOwnership: true) { Name = "Layer Name", Visible = true, BlendMode = LayerBlendMode.Normal, Opacity = 255 }; // then add the layer to a document Document document = new Document(width, height); document.Layers.Add(layer);
  4. Yes. It works with the store version. The installer specifically supports it. Yes. That's how it works. Colored tracing isn't supported yet. If you need colored tracing i recommend using vtracer or Inkscape.
  5. Hi, welcome to the forum. This means the plugin couldn't vectorize your image. It mostly depends on your input image, really. You can't vectorize an empty image e.g. The boundaries/edges need to be clearly visible in your image beforehand for a high quality tracing output. It works best with black/white drawings. Try changing some settings like Brightness cutoff, Highpass filter radius until it detects the boundaries in your image. You'll be able to export it afterwards.
  6. Works fine for me now 👍 FYI, @mickiebon
  7. Tried to debug it myself. `e.Brush` is null for me in this line. I don't have any brushes. Dropdown is empty. It looks for "Smudge Brushes" folder in "paint.net User Files" which I don't have. using (Surface brushsource = e.Brush.GetSurface(e.BrushWidth)) Exception details: System.NullReferenceException: Object reference not set to an instance of an object. at pyrochild.effects.smudge.SmudgeRenderer.OnMouseDown(QueuedToolEventArgs le) in D:\src\pdn-smudge\Smudge\SmudgeRenderer.cs:line 158 at pyrochild.effects.common.QueuedToolRenderer.Render() in D:\src\pdn-smudge\Smudge\QueuedToolRenderer\QueuedToolRenderer.cs:line 116 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
  8. It's crashing for me as well. It happens as soon as I click. Exception details: System.NullReferenceException: Object reference not set to an instance of an object. at pyrochild.effects.smudge.SmudgeRenderer.OnMouseDown(QueuedToolEventArgs le) at pyrochild.effects.common.QueuedToolRenderer.Render() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
  9. It sounds like you saved your work in PDN format (or another format) but with PNG extension (or changed it to PNG afterwards.) Try changing the extension to PDN then open. Paint.NET chooses the correct decoder based on the file extension. PNG is giving the wrong hint in this case.
  10. Updated to v1.0.6.0. This is a big update. Most of the code has been rewritten. Changelog: * Added basic image tracing (vectorization) functionality which works best with black & white drawings. You may save the result as SVG or export as Shape. * Switched to use resvg library for rendering engine. It seems to be rendering SVGs much more accurately. * Lots of bug fixes and improvements. * Fixed auto-switching of theme issue.
  11. You'll need to use both IL Linker Tool (included in dotnet SDK) and ILRepack for this. Trimming works for DLLs as well if you call it from the command line (using dotnet exec). (You'll probably want to fix the path below) dotnet exec "C:\Program Files\dotnet\sdk\7.0.101\Sdks\Microsoft.NET.ILLink.Tasks\tools\net7.0\illink.dll" -a "$(TargetPath)" all --trim-mode copy --action copy -d $(TargetDir) --skip-unresolved --action link "ComputeSharp.Core" --action link "ComputeShare.D2D1" -out "$(TargetDir)output" Here is the post-build event you can use for your plugin: <PropertyGroup> <!-- Set Path Variables --> <PdnRoot>C:\Program Files\paint.net</PdnRoot> <illink>C:\Program Files\dotnet\sdk\7.0.101\Sdks\Microsoft.NET.ILLink.Tasks\tools\net7.0\illink.dll</illink> </PropertyGroup> <!-- Note: Debugging merged/trimmed assemblies can be problematic. So I set a condition that it only works with Release builds. --> <Target Name="TrimAndMerge" AfterTargets="PostBuildEvent" Condition="'$(ConfigurationName)' == 'Release'"> <!-- 1st Step: Trimming with ILLink --> <Exec Command="dotnet exec &quot;$(illink)&quot; -a &quot;$(TargetPath)&quot; all &#45;&#45;trim-mode copy &#45;&#45;action copy -d $(TargetDir) &#45;&#45;skip-unresolved &#45;&#45;action link &quot;ComputeSharp.Core&quot; &#45;&#45;action link &quot;ComputeShare.D2D1&quot; -out &quot;$(TargetDir)output&quot;" /> <!-- 2nd Step: Merge with ILRepack --> <Exec Command="ilrepack /internalize /union &quot;$(TargetDir)output\$(TargetName).dll&quot; &quot;$(TargetDir)output\ComputeSharp.Core.dll&quot; &quot;$(TargetDir)output\ComputeSharp.D2D1.dll&quot; /lib:&quot;$(PdnRoot)&quot; /out:&quot;$(TargetPath)&quot;" /> <!-- 3rd Step: Remove the output directory and its contents created by illink --> <Delete Files="$(TargetDir)output" ContinueOnError="false" /> <RemoveDir Directories="$(TargetDir)output" ContinueOnError="false" /> </Target>
  12. Same problem here. '2' is visible when you first time open the menu. But after you select another size, it disappears.
  13. @Pixey No, you don't need to disable Defender completely. You can add an exclusion. See here: https://support.microsoft.com/en-us/windows/add-an-exclusion-to-windows-security-811816c0-4dfd-af4a-47e4-c301afe13b26?ui=en-US&rs=en-US&ad=US#ID0EBF=Windows_11 If you're having trouble to do this (because Windows being so fast to delete the file), just disable "Real-time Protection" temporarily then add the exclusion.
  14. Yes, this isn't right. There should be a lot of files in this folder. Try uninstalling Paint.NET. If it fails use this tool to remove any traces of Paint.NET from your computer. https://support.microsoft.com/en-us/topic/fix-problems-that-block-programs-from-being-installed-or-removed-cca7d1b6-65a9-3d98-426b-e9f927e1eb4d Then you should be able to reinstall.
  15. Run the PdnRepair.exe tool which you can find in the installation folder.
  16. There is an option named Shape draw/fill mode. More info here: https://www.getpaint.net/doc/latest/ShapeTools.html#12 Example: https://www.getpaint.net/doc/latest/ShapeTools.html#20
  17. How about StatusStrip with ProgressBar and Label or just Label?
  18. If you downloaded the zip file you must extract it first. There is a file named nonagon.xaml in it and you must put this file into the Shapes folder, or you can directly extract the zip into the Shapes folder. ( * I had to zip it because forum doesn't allow uploading as .xaml ) It goes up to 8, not 9
  19. Contents of .xaml (Paint.NET Shape) file: <ps:SimpleGeometryShape xmlns="clr-namespace:PaintDotNet.UI.Media;assembly=PaintDotNet.Framework" xmlns:ps="clr-namespace:PaintDotNet.Shapes;assembly=PaintDotNet.Framework" DisplayName="Nonagon" Geometry="M 250,8.7 L 409.9,66.87,495,214.32,465.44,381.89,335.1,491.3,164.9,491.3,34.56,381.89,5,214.32,90.1,66.87,250,8.7 Z "/> Zipped file: nonagon.zip
  20. Try lower radius values. My sample was too zoomed in so I had to use bigger radius. I don't know. You could try recreating the texture maybe? Because it's easier that way. I used this texture: https://www.shutterstock.com/image-vector/detailed-woven-fabric-texture-seamless-repeat-1484323856
×
×
  • Create New...