Jump to content
How to Install Plugins ×

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


otuncelli

Recommended Posts

This is a paint.net filetype plugin for loading SVG (Scalable Vector Graphics) and its compressed variant SVGZ files. SVG elements can be rendered as a flat image file or each on a separate layer. This plugin also provides basic image tracing (raster to vector conversion) functionality which works best with black and white drawings. You may export the tracing result as SVG or Paint.NET Shape.

 

Prerequisites

paint.net 5.0.9 or later


Download links

The easiest and recommended way to install the plugin is using the installer. It supports Store and Classic versions of Paint.NET. If you're using the Portable version of Paint.NET please use the manual installation method.

 

💾 Installer

SvgFileTypePlugin_setup.exe

 

💾 Manual Installation

SvgFileTypePlugin.zip

 

How to install

 

⚠️ Note: Before install make sure you don't have any other file type plugin installed handling the same file extensions: .svg, .svgz

 

👉 To auto install (recommended) the plugin perform the following steps:

  • Download and run SvgFileTypePlugin_setup.exe
  • Follow the steps of the setup wizard.

 

👉 To manually install the plugin perform the following steps:

  • Make sure paint.net is not running.
  • Download and extract SvgFileTypePlugin.zip
  • If you're using Classic version of paint.net:
    • Copy the SvgFileTypePlugin folder to the <paint.net>\FileTypes directory (Default location is C:\Program Files\paint.net\FileTypes).
  • If you're using Microsoft Store version of paint.net:
    • Copy the SvgFileTypePlugin folder to the <Documents>\paint.net App Files\FileTypes directory.
  • Done. You may start paint.net.

 

Supported languages

English
Turkish

Feel free to submit translations for the other languages. You may find the reference English .resx file here.

 

Old versions

I do not support or provide binary links for the old releases. However, you may download the archived source code and compile it yourself.

 

License

GPL version 2

 

Source code

 

Edited by otuncelli
updated to v1.0.6.0
  • Like 4
  • Upvote 2
Link to comment
Share on other sites

Updated to v1.01.

 

Changelog:

  • Fixed some bugs that leading crash.
  • Some GUI changes.
  • Viewport x, y values were not displaying correctly.
  • Fixed duplicate import of groups when using Group import mode.
  • Auto-generated layer names are now more meaningful.
  • Added a memory warning message when importing many layers.
  • Case-insensitive comparison of values for visibility attributes (visibility & display) for svg elements.
Edited by otuncelli
fixed a typo
  • Like 1
  • Upvote 2
Link to comment
Share on other sites

Updated to v1.02 🥰

 

Changelog:

  • Fixed an error that causes paint.net to crash when setting canvas dimensions (#11)
  • Updated to use SVG.NET v3.2.3 and Fizzler v1.3.0
  • Like 2
  • Upvote 1
Link to comment
Share on other sites

  • 4 weeks later...
Quote

To install the plugin perform the following steps:

  • Put the DLL in the <Paint.NET>\FileTypes directory (default location is C:\Program Files\paint.net\FileTypes)
  • For the Windows Store version of Paint.NET, put the DLL in the <Documents>\paint.net App Files\FileTypes directory
  • Restart Paint.NET if you have it open


I have installed the plugin as described above.

But the Scalable Vector Graphics ( SVG, SVGZ )  file types are not showing up in the file type drop down menu of the ''Save As'' dialogue box.
Please let me know how to resolve the situation.

Link to comment
Share on other sites

24 minutes ago, Juggernaut- said:

But the Scalable Vector Graphics ( SVG, SVGZ )  file types are not showing up in the file type drop down menu of the ''Save As'' dialogue box.

 

The plugin only supports loading SVG files, it does not support saving them.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

But the curves and lines created on different layers of Paint .NET will become non editable when saved / converted to PNG ? 

Link to comment
Share on other sites

2 hours ago, Juggernaut- said:

But the curves and lines created on different layers of Paint .NET will become non editable when saved / converted to PNG ? 

 

Yes, that's exactly right... because Paint.NET is a raster image editor and not a vector image editor.

 

If you want to save a vector image in a vector format, you should use a vector editor, like InkScape.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Application paint.net 4.3 (α 4.300.7879.42543)

Quote

C:\Program Files\paint.net\FileTypes\SvgFileType.dll, версии 1.0.0.0

Тип: System.Web.IHttpAsyncHandler
System.TypeLoadException: Could not load type 'System.Web.IHttpAsyncHandler' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

Before that, there was a smaller plugin of the same version (598 KB = 612864), but the update did not help.

+

Spoiler

report

answer


 

Edited by AlexDolmatov
Add link
Link to comment
Share on other sites

Quote

Currently I'm working on this. I'll release a new .NET 5 compatible version in a day or two.

 

otuncelli commented on github.

  • Upvote 2
Link to comment
Share on other sites

Links updated to v1.03 🥰

 

Changelog:

  • Removed ASP.NET dependency of SVG.NET library.
Edited by otuncelli
  • Like 1
  • Upvote 1
Link to comment
Share on other sites

@otuncelli

Unable to load in beta 4.3.7881

 

C:\Program Files\paint.net\FileTypes\SvgFileType.dll, version 1.0.3.0

System.IO.FileNotFoundException: Could not load file or assembly 'Svg, Version=3.2.0.0, Culture=neutral, PublicKeyToken=12a0bac221edeae2'. The system cannot find the file specified.
File name: 'Svg, Version=3.2.0.0, Culture=neutral, PublicKeyToken=12a0bac221edeae2'

 

I checked 3 times to ensure everything was placed correctly. 
 

 

  • Thanks 1

PaintNetSignature.png.6bca4e07f5d738b2436f83d0ce1b876f.png

Link to comment
Share on other sites

Well done @otuncelli

Issue resolved. Once I removed the other plugin, yours took over. No need to scroll down and select filetype. If the file is a true SVG, paint opens it automatically.

Thank you for the updated plugin.

  • Upvote 1

PaintNetSignature.png.6bca4e07f5d738b2436f83d0ce1b876f.png

Link to comment
Share on other sites

  • 2 weeks later...

This is the SVG file I am importing:

image.png.0e8dcbd72ba0a7c34ff102ac7eb69576.png (2nd path is cropped out because it is long)

Should the dialog box say 

n/a, 0, n/a

for Size settings while importing this file?

image.png.7dd5862105b835769573b7c31b99b2b7.png

It is reading successfully, but I cannot edit any Viewport and ViewBox settings, and changing Canvas beyond 500 only adds transparent pixels to the side and bottom and I cannot resize the actual rendering.

I don't have the other old SVG filetype plugin installed.

 

There isn't any information on how this plugin is supposed to work, so I don't know if this is abnormal or not.

Edited by ThreadSnake
added clarification in one sentence
Link to comment
Share on other sites

Hi @ThreadSnake

 

This could be related to an issue with SVG.NET library internally used by the plugin which does the actual SVG reading.

 

Issue is here: https://github.com/svg-net/SVG/issues/837

 

I'll check this again more thoroughly. If it's something I can fix, I'll update the plugin. Viewbox and Viewport fields are just informational fields. You can't edit them.

 

Thanks for reporting.

 

As a workaround, adding "viewBox" attribute to svg definition seems to fix the problem.

 

<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500" viewBox="0 0 500 500">

 

Edited by otuncelli
  • Thanks 1
Link to comment
Share on other sites

Updated to v1.04.

 

Changelog:

  • Fixed a size detection problem.
  • Added support for rendering use element when importing with layers (experimental)
  • Fixed a crash when clicking the GitHub link on Paint.NET 4.3+
  • License changed to LGPL
Edited by otuncelli
  • Like 1
  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...

The plugin stopped working after upgrading Paint.net to v4.3 (and 4.3,.)

 

C:\Program Files\paint.net\FileTypes\SvgFileType.dll, version 1.0.0.0

Type: System.Web.IHttpAsyncHandler
System.TypeLoadException: Could not load type 'System.Web.IHttpAsyncHandler' from assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

 

Link to comment
Share on other sites

1 hour ago, Wertyx said:

C:\Program Files\paint.net\FileTypes\SvgFileType.dll, version 1.0.0.0

 

It looks like you're using an outdated version of the plugin. Please download and install the current version.

(September 25th, 2023)  Sorry about any broken images in my posts. I am aware of the issue.

bp-sig.png
My Gallery  |  My Plugin Pack

Layman's Guide to CodeLab

Link to comment
Share on other sites

58 minutes ago, toe_head2001 said:

 

It looks like you're using an outdated version of the plugin. Please download and install the current version.

 

Yes, I suspected that might be the case and got the latest version from GitHub and it worked.

I should have checked that before posting, but no version was indicated in the original post and of course I did not read the whole thread... 😛

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