Jump to content

otuncelli

Members
  • Posts

    292
  • Joined

  • Last visited

  • Days Won

    8

otuncelli last won the day on April 28 2023

otuncelli had the most liked content!

Recent Profile Visitors

48,279 profile views

otuncelli's Achievements

  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.
×
×
  • Create New...