Jump to content



Recommended Posts

Imports SVG files and renders them to Paint.NET bitmap layers.
This is a stand-alone plugin for Paint.NET and does not require Inkscape.

This plugin will be part of the path tools.

Warning: This software is still beta and just for test. If you see issues not on the ToDo list then feel free to provide a test svg file.



post-79572-0-26869600-1375979904_thumb.j gallardo.svg.zip

- Copy the two files OptionBasedLibrary v0.3.dll/.dlc to the Paint.NET\ folder (NOT to Paint.NET\FileTypes\ !!!)
- Copy the two files ImSVGTiny.FileType.dll/.dlc to the Paint.NET\FileTypes\ folder
- Remove other plugins supporting the same file type (.svg) from Paint.NET\FileTypes\ folder (to avoid possible conflicts)
  I.e. 'SVGImport.dll' plugin.
- Do not remove older versions of the OptionBasedLibrary if they are required from other plugins.

Load dialog options
- Canvas: The SVG file may or may not contain settings about the size of the image to produce (see 'File settings' at the
  end of the dialog). You may overwrite the proposed option to get a better quality of the image.
- Resolution: The DPI value is used to setup the document and to calculate coordinates and lengths in the SVG file (if
  a unit identifier like inch or mm is used with a value).
- Background: Typically the background of an SVG file is transparent. This option allows you to select your own background.
  If the 'Layers' option is not set to 'flat' then the background will be placed in a seperate layer.
- Layers: If this option is not set to 'flat' then a new layer will be generated for each top-level element in the
  svg file. If you created the file with Inkscape it will show you the inkscape layer structure.
  Be warned: Depending on the file the not 'flat' option will generate a lot of layers. This may slow down the application.
- File folder: Paint.NET does not provide the file path to the plugin (just a data stream). If an SVG file uses
  relative references to other files (like bitmap images) then this option allows you to specify the SVG file folder.
- 'File settings' options (read only)
  - Viewport is the size to use on the canvas
  - Viewbox is the range of coordinates used in the SVG file. The viewbox will be stretched to the viewport respecting
    aspect ratio (or not).
  - Title: The 'title' element of the svg file.
  - Description: The 'desc' element of the svg file.

Known issues:
- If you are canceling the option dialog you will get an unspecified error. But this just means that Paint.NET
  has no idea about canceling the load operation.
- If you try to 'Save' (not 'Save As') a loaded svg then Paint.NET will not fallback to 'Save As' automatically.
  The 'Save' dialog opens and shows an error.
- The option dialog has no owner because OnLoad() runs in a different thread than the Paint.NET Ui. The disadvantage
  is that you will not get a warning beep if you try to activate the application. Still the dialog stays modal to Paint.NET.
- The Browse For Folder dialog is even worse. Because this dialog requires OLE it has to run in a STA thread.

On the 'To do'  list:
- Add support for filter element (Minimum Gaussean blur).
- Improve text support (Font handling, text areas and text on path)
- Better support for SpreadMethod attribute used for gradients.

ImSVG.FileType v0.7.zip

Edited by midora

midoras signature.gif

Link to comment
Share on other sites

  • 3 weeks later...

Version 0.7 is no longer Tiny (this part of the SVG standard is too restrictive). Beside of filter effects it renders not too bad ;-)

At the end it shows the power of GDI+ (even if the internal lib may move in the future to a different graphics interface).

midoras signature.gif

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.

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