Importing SVG - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions) +--- Thread: Importing SVG (/Thread-Importing-SVG) |
Importing SVG - Krikor - 09-30-2022 Hello guys, This is the situation: I downloaded a .SVG, specifically this one: https://en.wikipedia.org/wiki/Protractor#/media/File:Degree-Radian_Conversion.svg However, after opening it with Gimp, either via File - Open... or via the paths window with Import path, only part of the paths are present in the Paths dialog. The image below illustrates the situation. In red the existing paths, in black the image correctly created, the white background is just for better visualization. [attachment=8774] Why is this kind of problem happening? Can anyone download this SVG and have all the paths displayed in the paths dialog? Any way around this problem? Thx! RE: Importing SVG - tmanni - 09-30-2022 The problem comes from the very basic support of SVG import : only "path" elements and basic shapes (like "rect" or "line") are recognized and added as gimp vectors. This file https://en.wikipedia.org/wiki/Protractor#/media/File:Degree-Radian_Conversion.svg has several "text" elements and "use" elements (to make copy of other existing elements) which are simply ignored. The -hard- way to fix this is to edit the svg file before importing into Gimp. Quickly tested with Inkscape, you can
RE: Importing SVG - rich2005 - 09-30-2022 Largely as tmanni You can get most of the way there from Inkscape & I am using a version 1.2 Some converted paths, including text from Inkscape, do not always import correctly in Gimp although the bitmap appears correct. In Inkscape. Open the file, and here I get a warning message which I have never seen before, about dpi Edit -> Select All Path -> Object to Path Save as a Plain SVG Mostly correct although there will be some elements to fix. A long list of paths, use the path tool to click-and-find. [attachment=8775] In case you do not have Inkscape, attached that adjusted image as a svgz RE: Importing SVG - rich2005 - 09-30-2022 An alternative to Inkscape - well known in linux - sk1 - I had to check that it works in Windows sk1 https://sk1project.net/sk1/download/ Using the portable Windows version: https://i.imgur.com/r26mdYv.jpg Nothing to do other than open the original svg image and immediately export as another svg file: https://i.imgur.com/5lczam5.jpg That opens in Gimp (with transparency) and without the path errors: https://i.imgur.com/m7Y1Hpl.jpg RE: Importing SVG - Krikor - 10-01-2022 I was a little disappointed with Gimp's lack of autonomy in dealing with this situation in relation to a .svg I tried to follow your suggestions regarding editing with Inkscape, but I didn't quite understand what "use" is. I ended up doing it this way: Edit > Select All; Edit > Clone > Unlink Clone (I don't know why this is, but I did it as suggested); Edit > Select All; Path > Object to Path. So I saved it as Plain SVG (I also have no idea the difference between svg and plain svg, but that doesn't matter at the moment). I thought it worked, but when I opened the file in Gimp I found that there were (as said by rich2005) corrections needed. I preferred to use the version provided by rich2005 for editing. A simple task, there are only 1951 paths in the paths dialog. [attachment=8778] I think I got something satisfying, although I didn't know what to do with that "lost" ellipse between degrees 90 and 110, so I just deleted it. I was completely unaware of the existence of this SK1, I was interested, and it can save me in case of other future complications like this. I downloaded the portable win64 version, and I intend to unzip it and test it later this afternoon. tmanni and rich2005, thanks a lot for your help! |