midora Posted October 14, 2013 Share Posted October 14, 2013 (edited) Moderators Note: There is an alternative plugin available by @otuncelli that supports Layers. https://forums.getpaint.net/topic/117086-scalable-vector-graphics-filetype-alternative-plugin-svg-svgz/ 'Scalable Vector Graphics' FileType Plugin (.SVG, .SVGZ) Summary Imports SVG files (and the compressed variant SVGZ) and renders them to Paint.NET bitmap layers. This plugin does not require an external renderer like Inkscape. The SVG specification is a living standard, do not expect that this plugin supports all features. (Some do not make sense in an image editor like interactivity or animation elements). Using the plugin you can open the downloaded files in any resolution you like w/o loss of quality. Author Martin Osieka Download >>ImSVG.FileType v0.18 (23.3.2014) Installation Follow the instructions carefully Copy the two files OptionBasedLibrary vX.X.dll/.dlc to the Paint.NET\ folder (NOT to Paint.NET\FileTypes\ !!!) Copy the two files ImSVG.Open.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. Remove older ImSVG*.* files. Do not remove older versions of the OptionBasedLibrary if they are required from other plugins. To verify the installation you should restart Paint.NET and check that in the filetype popup of the open file selector dialog is an entry starting with SVG. Compatibility Paint.NET 3.5.11 and 4.0.5 Supported languages The language used in the plugin depends on the language setting of Paint.NET and the support of this language by the plugin. The fallback is the first supported language of the plugin. Languages are defined in the .dlc files. This plugin supports the following languages in the moment: English Deutsch Dialog options http://www.comsquare.ch/files/downloads/ImSVG.Open.FileType.Dialog.jpg Size settings given in SVG file (readonly) Some SVG files provide hints about the canvas to create by the application. Viewport is the size to use on the canvas. Width and height may show a unit or a percentage. Viewbox is the range of coordinates used in the SVG file. The viewbox will be stretched to the viewport respecting aspect ratio (or not). Size selection by user Resolution: The DPI value is used to setup the document and to calculate coordinates and lengths in the SVG file. If the viewport has values with units then changing the dpi value will change the canvas pixel size. This allows you to get a better quality of the rendered SVG graphic. Canvas: The pixel size used for the document. Keep Aspect Ratio: Keeps the ratio between canvas width and canvas height Options 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 Infos (read only) (only visible if they are defined in the SVG file) Title: The 'title' element of the svg file. Description: The 'desc' element of the svg file. Known issues Paint.NET does not provide a load dialog template to filetype plugins. So to allow ImSVG to show a dialog it delegates its dialog (derived from PdnBaseForm) to the thread of the main window. This works fine but not perfect. So you will not get an error beep if you are clicking to the main window while the ImSVG dialog is open. If you are cancelling the option dialog you will get an unspecified error. But this just means that Paint.NET has no idea about cancelling the open operation. Paint.NET 4.0 shows in the "Error details" that the user cancelled the action. Paint.NET 3.5.11: 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. This is fixed in Paint.NET 4.0. 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. Examples Here are two examples of SVG files from Wikipedia.de 'Smiley' http://upload.wikimedia.org/wikipedia/commons/d/d5/Face-angel.svg http://upload.wikimedia.org/wikipedia/commons/7/70/Face-devil-grin.svg Remark: For some reason the image tag of the thread editor does not allow the .svg extension. Therefore here are the .png versions http://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Face-angel.svg/48px-Face-angel.svg.png http://upload.wikimedia.org/wikipedia/commons/thumb/7/70/Face-devil-grin.svg/48px-Face-devil-grin.svg.png History 0.18 (23.3.2014) - Dll name changed from ImSVG.FileType.dll to ImSVG.Open.FileType.dll - Changed the handling of the resolution and canvas options. - Updated to OptionBasedLibraray 0.6 0.10 (15.10.2013) - Patches to support Paint.NET 4.0 0.9 (14.10.2013) - First public release Edited September 17, 2020 by midora Updated moderator note 1 3 Quote Link to comment Share on other sites More sharing options...
barbieq25 Posted October 14, 2013 Share Posted October 14, 2013 I have never used SVG files before but mostly because I don't know enough about them. Now I have some research to do Thank you Quote Knowledge is no burden to carry. April Jones, 2012 Gallery My DA Gallery Link to comment Share on other sites More sharing options...
midora Posted October 15, 2013 Author Share Posted October 15, 2013 I have never used SVG files before but mostly because I don't know enough about them. Now I have some research to do Thank you This is just a small part of the path tools which may allow you (hopefully) to edit vectors in Paint.NET. We like to support you the artists :-) 1 Quote Link to comment Share on other sites More sharing options...
midora Posted October 15, 2013 Author Share Posted October 15, 2013 Update 0.10 (15.10.2013)- Patches to support Paint.NET 4.0 Quote Link to comment Share on other sites More sharing options...
midora Posted March 23, 2014 Author Share Posted March 23, 2014 Update 0.18 (23.3.2014)- Dll name changed from ImSVG.FileType.dll to ImSVG.Open.FileType.dll- Changed the handling of the resolution and canvas options.- Updated to OptionBasedLibraray 0.6 Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted March 30, 2014 Share Posted March 30, 2014 Thanks for the notification of the change in DLL name. Flagged for Aprils revision of the Plugin Index. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Traci S Posted April 14, 2014 Share Posted April 14, 2014 Sorry I am a newbie here & a bit lost. I followed your instructions & put things where you said to put them. I reopened Paint.net & can't find it anywhere. Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted April 14, 2014 Share Posted April 14, 2014 It's a file type plugin Traci. That means it adds the ability to load (+ sometimes Save) new file formats. Once loaded, this plugin gives you the option to load an SVG file - you'll find this option listed in the Load File dialog. There is a drop-down list in the dialog which contains all the file extensions you can load. SVG should be among them if this plugin is installed correctly. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
RetoJournalism Posted April 6, 2015 Share Posted April 6, 2015 Hi. I keep getting this error message when I try to open my .SVG file. Can you tell me whats wrong? System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: <defaultValueX>=112252 our of range [1 32767] at OptionControls.OptionTypeVectorEditBox`1..ctor(Enum optId, OptionContext optContext, TValue defaultValueX, TValue minValueX, TValue maxValueX, TValue defaultValueY, TValue minValueY, TValue maxValueY) at OptionControls.OptionInt32VectorEditBox..ctor(Enum optId, OptionContext optContext, Int32 defaultValueX, Int32 minValueX, Int32 maxValueX, Int32 defaultValueY, Int32 minValueY, Int32 maxValueY) at OptionBasedFileTypes.SvgFileType.OnLoad(Stream input) at PaintDotNet.FileType.Load(Stream input) in d:\src\pdn\paintdotnet\src\Data\FileType.cs:line 476 at PaintDotNet.Functional.Func.Eval[T1,TRet](Func`2 f, T1 arg1) in d:\src\pdn\paintdotnet\src\Base\Functional\Func.cs:line 158 Thanks Quote Link to comment Share on other sites More sharing options...
midora Posted April 6, 2015 Author Share Posted April 6, 2015 It looks like that basic dimensions of the svg are too larger to be handled with the plugin. Could you open the .svg file with a text editor and post the beginning with the <svg > xml tag? Quote Link to comment Share on other sites More sharing options...
painter84 Posted June 24, 2015 Share Posted June 24, 2015 Hello, I am getting the same error message as mentioned above and cannot open svg files. Thank you for any help. painter84 Quote Link to comment Share on other sites More sharing options...
midora Posted June 24, 2015 Author Share Posted June 24, 2015 It looks like that basic dimensions of the svg are too larger to be handled with the plugin. Could you open the .svg file with a text editor and post the beginning with the <svg > xml tag? Same request. No info => no chance to fix or provide better error messages. Quote Link to comment Share on other sites More sharing options...
painter84 Posted June 25, 2015 Share Posted June 25, 2015 Do you mean this: <?xml version="1.0" encoding="UTF-8" standalone="no"?><!-- Created with Inkscape (http://www.inkscape.org/) --><svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" width="221.14319" height="45.950214" id="svg9957" inkscape:version="0.91 r13725" sodipodi:docname="tape-1.svg"> Quote Link to comment Share on other sites More sharing options...
midora Posted June 25, 2015 Author Share Posted June 25, 2015 This fragment (with a closing </svg>) loads fine for me (Paint.Net 4.0.5, ImSVG.Open.FileType v0.18). Means the dialog which shows these values does not crash. So if possible add the crashing .svg here (you have to zip it before) or provide a link. Quote Link to comment Share on other sites More sharing options...
davidshq Posted August 13, 2015 Share Posted August 13, 2015 I'm getting the following error when I try to open an SVG file: Quote - http://www.davemackey.net/ Link to comment Share on other sites More sharing options...
BoltBait Posted August 13, 2015 Share Posted August 13, 2015 Zip up and attach the svg file here so the author can debug. Just be sure it is family friendly, ok? Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
midora Posted August 14, 2015 Author Share Posted August 14, 2015 I'm getting the following error when I try to open an SVG file: Because the error is just at the beginning of the file it maybe enough to open the .svg file with an text editor and copy paste the first lines here. Quote Link to comment Share on other sites More sharing options...
Transportfan Posted February 9, 2016 Share Posted February 9, 2016 I installed the .svg plugin and followed the installation instructions but it didn't work and there's no .svg option in 'Save as'. 'Scalable Vector Graphics' FileType Plugin (.SVG, .SVGZ) - FileType Plugins - Paint.NET Forum Quote Link to comment Share on other sites More sharing options...
BoltBait Posted February 9, 2016 Share Posted February 9, 2016 The SVG plugin is for opening SVG files only, not saving them. Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
Rick Brewster Posted February 9, 2016 Share Posted February 9, 2016 The "Plugins - For Publishing Only" section is only for publishing plugins. Moved this to Troubleshooting section. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted February 10, 2016 Share Posted February 10, 2016 To keep the discussion of this plugin in one place I've merged the separate thread (previous three posts) into this one. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
neutcomp Posted April 5, 2016 Share Posted April 5, 2016 I have the same error: System.ArgumentOutOfRangeException: Specified argument was out of range of valid values. Parameter name: <defaultValueX>=675455 our of range[1 32767].... I don't know how to upload an SVG file to this forum but here is the picture: data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMTU1IDE1NSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+SW1wb3J0ZWQgTGF5ZXJzPC90aXRsZT48cGF0aCBkPSJNODkuNDYgMmw4LjEyNyAxMy42NzcgMTQuNjE4LTYuMjg3IDMuNTA1IDE1LjUyIDE1Ljg0Mi0xLjQ2Mi0xLjQ2MiAxNS44NDMgMTUuNTIgMy41MDctNi4yODcgMTQuNjE1TDE1MyA2NS41NDIgMTQyLjUwNSA3Ny41IDE1MyA4OS40NTdsLTEzLjY3NyA4LjEzIDYuMjg3IDE0LjYxNS0xNS41MiAzLjUwNiAxLjQ2MiAxNS44NDItMTUuODQyLTEuNDYzLTMuNTA1IDE1LjUyLTE0LjYxOC02LjI4N0w4OS40NiAxNTMgNzcuNSAxNDIuNTA1IDY1LjU0IDE1M2wtOC4xMjctMTMuNjc3LTE0LjYxOCA2LjI4Ny0zLjUwNS0xNS41Mi0xNS44NDMgMS40NjIgMS40NjMtMTUuODQzLTE1LjUyLTMuNTA3IDYuMjg1LTE0LjYxNUwyIDg5LjQ1OGwxMC40OTQtMTEuOTZMMiA2NS41NDNsMTMuNjc1LTguMTNMOS4zOSA0Mi43OTdsMTUuNTItMy41MDYtMS40NjMtMTUuODQyIDE1Ljg0MyAxLjQ2TDQyLjc5NSA5LjM5bDE0LjYxOCA2LjI4N0w2NS41NCAyIDc3LjUgMTIuNDk1IDg5LjQ2IDJ6IiBzdHJva2U9IiM4MTVGODYiIHN0cm9rZS13aWR0aD0iMiIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIi8+PC9zdmc+ Quote Link to comment Share on other sites More sharing options...
username1 Posted April 9, 2016 Share Posted April 9, 2016 I'm trying to open SVG files from examples (first post of this thread) with paint.net 4.0.5 and ImSVG.Open.FileType 0.18.00 (everything is installed correctly and PDF filetype plugin from Martin Osieka works great). I'm getting this error: System.FormatException: Input string was not in a correct format. at System.Number.ParseSingle(String value, NumberStyles options, NumberFormatInfo numfmt) at ControlExtensions.ImSvg.Meal.EatNumber(Single& number) at ControlExtensions.ImSvg.AttributeOpacityInheritE(XmlNode elementNode, List`1 ancestors, String attributeName, Single defaultValue) at ControlExtensions.ImSvg.ElementNode(Graphics g, XmlNode elementNode, Int32 depth) at ControlExtensions.ImSvg.ElementG(Graphics g, XmlNode elementNode, Int32 depth) at ControlExtensions.ImSvg.ElementNode(Graphics g, XmlNode elementNode, Int32 depth) at ControlExtensions.ImSvg.ElementSvg(Graphics g, XmlNode svgElementNode, Int32 depth) at OptionBasedFileTypes.SvgFileType.OnLoad(Stream input) at PaintDotNet.FileType.Load(Stream input) in d:\src\pdn\paintdotnet\src\Data\FileType.cs:line 477 at PaintDotNet.Functional.Func.Eval[T1,TRet](Func`2 f, T1 arg1) in d:\src\pdn\paintdotnet\src\Base\Functional\Func.cs:line 158 Please help! Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted April 9, 2016 Share Posted April 9, 2016 I'm trying to open SVG files from examples (first post of this thread) with paint.net 4.0.5 and ImSVG.Open.FileType 0.18.00 (everything is installed correctly and PDF filetype plugin from Martin Osieka works great). I'm getting this error: 1) Update to the most recent version of paint.net 2) Ensure you have downloaded the .svg file correctly, and your browser hasn't injected rubbish into the file. ie: open the file in a text editor to ensure it's valid svg markup. Quote June 9th, 2023: Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
MJW Posted April 10, 2016 Share Posted April 10, 2016 I just tried the plugin with a quite large (2.35 MB) SVG file output by Inkscape, and it worked great. Now that I understand better how to convert raster images to vector images with Inkscape, this may prove to be quite useful. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.