Jump to content
How to Install Plugins ×

'Scalable Vector Graphics' FileType Alternative Plugin (.SVG, .SVGZ)


otuncelli

Recommended Posts

  • 1 year later...
  • 1 month later...

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.

  • Like 1
  • Hooray 1
Link to comment
Share on other sites

  • 1 month later...

Sorry if it appears that I am nagging, but I have another observation. The plugin appears to be seeking for core libraries inside of the plugins directory, and whines about it in `plugin errors` if it isn't there.

I have been informed that having such library files like `PaintDotNet.core.dll` inside of the plugins directory instead of being left as part of Pant.NET app itself, is a bad practice nowadays.

Link to comment
Share on other sites

11 minutes ago, Colonel_Gerdauf said:

The plugin appears to be seeking for core libraries inside of the plugins directory, and whines about it in `plugin errors` if it isn't there.

 

Can you post the error?

Link to comment
Share on other sites

I need to figure out how to post long text in a suitable format


C:\Users\Colonel_Gerdauf\Documents\paint.net App Files\FileTypes\SvgFileTypePlugin\SvgFileType.dll, version 1.0.6.0

System.IO.FileNotFoundException: Could not load file or assembly 'PaintDotNet.Core, Version=5.9.8621.1636, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'PaintDotNet.Core, Version=5.9.8621.1636, Culture=neutral, PublicKeyToken=null'
 ---> System.IO.FileNotFoundException: Could not load file or assembly 'PaintDotNet.Core, Version=5.9.8621.1636, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'PaintDotNet.Core, Version=5.9.8621.1636, Culture=neutral, PublicKeyToken=null'
   at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext, RuntimeAssembly requestingAssembly, Boolean throwOnFileNotFound)
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName)
   at PaintDotNet.Runtime.Loader.TrustedPlatformAssemblyResolver.Load(ILoadContext loadContext, AssemblyName assemblyName, String assemblyPath) in D:\src\pdn\src\PaintDotNet\Runtime\Loader\TrustedPlatformAssemblyResolver.cs:line 129
   at PaintDotNet.Runtime.Loader.CombinedAssemblyLoader.Load(ILoadContext loadContext, AssemblyName assemblyName, String assemblyPath) in D:\src\pdn\src\PaintDotNet\Runtime\Loader\CombinedAssemblyLoader.cs:line 51
   at PaintDotNet.Runtime.Loader.LoadContext.AssemblyLoadContextImpl.Load(AssemblyName assemblyName) in D:\src\pdn\src\PaintDotNet\Runtime\Loader\LoadContext.cs:line 168
   at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName)
   at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)

System.IO.FileNotFoundException: Could not load file or assembly 'PaintDotNet.Data, Version=5.9.8621.1636, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'PaintDotNet.Data, Version=5.9.8621.1636, Culture=neutral, PublicKeyToken=null'
 ---> System.IO.FileNotFoundException: Could not load file or assembly 'PaintDotNet.Data, Version=5.9.8621.1636, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'PaintDotNet.Data, Version=5.9.8621.1636, Culture=neutral, PublicKeyToken=null'
   at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext, RuntimeAssembly requestingAssembly, Boolean throwOnFileNotFound)
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName)
   at PaintDotNet.Runtime.Loader.TrustedPlatformAssemblyResolver.Load(ILoadContext loadContext, AssemblyName assemblyName, String assemblyPath) in D:\src\pdn\src\PaintDotNet\Runtime\Loader\TrustedPlatformAssemblyResolver.cs:line 129
   at PaintDotNet.Runtime.Loader.CombinedAssemblyLoader.Load(ILoadContext loadContext, AssemblyName assemblyName, String assemblyPath) in D:\src\pdn\src\PaintDotNet\Runtime\Loader\CombinedAssemblyLoader.cs:line 51
   at PaintDotNet.Runtime.Loader.LoadContext.AssemblyLoadContextImpl.Load(AssemblyName assemblyName) in D:\src\pdn\src\PaintDotNet\Runtime\Loader\LoadContext.cs:line 168
   at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName)
   at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)

System.IO.FileNotFoundException: Could not load file or assembly 'PaintDotNet.PropertySystem, Version=5.9.8621.1636, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'PaintDotNet.PropertySystem, Version=5.9.8621.1636, Culture=neutral, PublicKeyToken=null'
 ---> System.IO.FileNotFoundException: Could not load file or assembly 'PaintDotNet.PropertySystem, Version=5.9.8621.1636, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'PaintDotNet.PropertySystem, Version=5.9.8621.1636, Culture=neutral, PublicKeyToken=null'
   at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext, RuntimeAssembly requestingAssembly, Boolean throwOnFileNotFound)
   at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName)
   at PaintDotNet.Runtime.Loader.TrustedPlatformAssemblyResolver.Load(ILoadContext loadContext, AssemblyName assemblyName, String assemblyPath) in D:\src\pdn\src\PaintDotNet\Runtime\Loader\TrustedPlatformAssemblyResolver.cs:line 129
   at PaintDotNet.Runtime.Loader.CombinedAssemblyLoader.Load(ILoadContext loadContext, AssemblyName assemblyName, String assemblyPath) in D:\src\pdn\src\PaintDotNet\Runtime\Loader\CombinedAssemblyLoader.cs:line 51
   at PaintDotNet.Runtime.Loader.LoadContext.AssemblyLoadContextImpl.Load(AssemblyName assemblyName) in D:\src\pdn\src\PaintDotNet\Runtime\Loader\LoadContext.cs:line 168
   at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName)
   at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)

Link to comment
Share on other sites

10 minutes ago, Colonel_Gerdauf said:

I need to figure out how to post long text in a suitable format

 

As discussed just now in your other thread, you need to get the latest version of Paint.NET. You're using 5.0, the latest is 5.0.9.

  • Upvote 1

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

31 minutes ago, Colonel_Gerdauf said:

The plugin appears to be seeking for core libraries inside of the plugins directory, and whines about it in `plugin errors` if it isn't there.

 

This is not true. As discussed in your other thread, you need to delete those files.

 

31 minutes ago, Colonel_Gerdauf said:

I have been informed that having such library files like `PaintDotNet.core.dll` inside of the plugins directory instead of being left as part of Pant.NET app itself, is a bad practice nowadays.

 

It's not "bad practice". It completely breaks things. A "bad practice" would be something that is frowned upon but still works.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

  • 4 weeks later...

I am getting a No Path image and an error when attempting to export. 

 

Exception:

System.InvalidOperationException: NO PATH
   at SvgFileTypePlugin.Export.SvgExport.Export(Surface input, Stream output, PropertyCollection props, ProgressEventHandler progressCallback, String shapePath)
   at PaintDotNet.FileType.Save(Document input, Stream output, SaveConfigToken token, Surface scratchSurface, ProgressEventHandler progressCallback, Boolean rememberToken) in D:\src\pdn\src\Data\FileType.cs:line 267
   at PaintDotNet.Controls.DocumentWorkspace.<>c__DisplayClass245_1.<DoSaveImpl>b__7() in D:\src\pdn\src\PaintDotNet\Controls\DocumentWorkspace.cs:line 2706
   at PaintDotNet.Functional.Func.Try(Action f) in D:\src\pdn\src\Fundamentals\Functional\Func.cs:line 75

Diagnostics:

Application                                                  paint.net 5.0.10 (Stable 5.10.8674.32967)
Build Date                                                   Sunday, October 1, 2023
Install type                                                 Classic

Language:                                                    en-US
DPI                                                          1 (1.00x scale)
UI/Canvas GPU                                                True
Rendering GPU                                                🚀 Performance (Radeon RX 560 Series)
Remote session                                               False
Animations                                                   True
Translucent windows                                          True
Windows Ink                                                  True

OS                                                           Windows 11 Education x64 (10.0.22621.0)
Runtime                                                      .NET 7.0.11 x64

Physical Memory                                              16,117 MB (6,050 MB free)
Paging File                                                  23,029 MB (5,468 MB free)

CPU                                                          Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz
    Speed                                                    ~2904 MHz
    Cores / Threads                                          8 / 16
    Features                                                 SSE, SSE2, SSE3, SSSE3, SSE4_1, SSE4_2, AVX, AVX2
 

Link to comment
Share on other sites

6 hours ago, whysomanyquestions said:

I am getting a No Path image and an error when attempting to export. 

 

 

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.

Edited by otuncelli
typo
Link to comment
Share on other sites

18 hours ago, janwarming said:

Does this SVG plugin works fully with the windows store version of paint.net?

 

Yes. It works with the store version. The installer specifically supports it.

 

18 hours ago, janwarming said:

When i open a svg file it display the file as expected, but when i save it, the svg file will be black and white when opened in a browser?

 

Yes. That's how it works. Colored tracing isn't supported yet. If you need colored tracing i recommend using vtracer or Inkscape.

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...