Import SVG Artwork
Moderator: Kyete
Import SVG Artwork
I made a compass rose. The source is a square svg, without any margins. After the import to OWM the image is placed in the upper right corner.
How do I prevent this?
How do I prevent this?
- Attachments
-
- compass.PNG (201.06 KiB) Viewed 8678 times
System information:
- Windows 10 Professional x64
- AMD Ryzen 5 3600XT
- 32GB DDR4 RAM
- Nvidia GeForce 3070 FE
- SilverSurfer1221
- Posts: 88
- Joined: Sat Jun 20, 2020 2:01 pm
Re: Import SVG Artwork
Is it OWM? Or is it your SVG file that is causing the issue? What program did you make the SVG file in? Is the "document" (where the compass was made) a square with the compass in the upper-left corner (for example)?
Re: Import SVG Artwork
I used Inkscape and saved the image as "normal svg". In Inkscape it's a square with no spacing to the sides, that's why I'm confused ^^
System information:
- Windows 10 Professional x64
- AMD Ryzen 5 3600XT
- 32GB DDR4 RAM
- Nvidia GeForce 3070 FE
- SilverSurfer1221
- Posts: 88
- Joined: Sat Jun 20, 2020 2:01 pm
Re: Import SVG Artwork
Just wanted to check. Can you share the file?
Re: Import SVG Artwork
Here's a file were this also happens.
- Attachments
-
- test.zip
- (790 Bytes) Downloaded 525 times
System information:
- Windows 10 Professional x64
- AMD Ryzen 5 3600XT
- 32GB DDR4 RAM
- Nvidia GeForce 3070 FE
- SilverSurfer1221
- Posts: 88
- Joined: Sat Jun 20, 2020 2:01 pm
Re: Import SVG Artwork
Thanks.
I can confirm - the SVG file opens perfectly in Affinity Designer, but imports into OWM at the upper-left of a much larger square, despite the created image being centered in a square barely larger than what was created. I've not worked with SVG files in OWM yet, but this happens to one I created on my end, too.
I can confirm - the SVG file opens perfectly in Affinity Designer, but imports into OWM at the upper-left of a much larger square, despite the created image being centered in a square barely larger than what was created. I've not worked with SVG files in OWM yet, but this happens to one I created on my end, too.
Re: Import SVG Artwork
We'll investigate/fix with V1.0.4.
The parser we wrote for SVG is a bit old now, so there must be something we missed.
Thank you for the sample!
- Alejandro
The parser we wrote for SVG is a bit old now, so there must be something we missed.
Thank you for the sample!
- Alejandro
Alejandro S. Canosa
Three Minds Software
Three Minds Software
Re: Import SVG Artwork
Took a quick look, it looks like the SVG attached defines a document area that is larger than the paths in it.
width="98.84073639mm"
height="97.72373962mm"
viewBox="0 0 98.84073639 97.72373962"
If you change the units to pixels instead of mm for the width and height it fixes the issue (you can just edit via notepad). Not sure why those are in mm in the file.
(EDIT: If you change via Inkscape then you'd have to scale the document/drawing size not just change the units).
I'll investigate more, but I'm thinking OWM is not at fault with this? Technically we could change the code to determine the boundaries of the paths/shapes in the document, but if I recall correctly that wasn't compatible with some files.
Thank you!
- Alejandro
You can see it in the file (in mm instead of pxs, so that's about 330x330 pixels).width="98.84073639mm"
height="97.72373962mm"
viewBox="0 0 98.84073639 97.72373962"
If you change the units to pixels instead of mm for the width and height it fixes the issue (you can just edit via notepad). Not sure why those are in mm in the file.
(EDIT: If you change via Inkscape then you'd have to scale the document/drawing size not just change the units).
I'll investigate more, but I'm thinking OWM is not at fault with this? Technically we could change the code to determine the boundaries of the paths/shapes in the document, but if I recall correctly that wasn't compatible with some files.
Thank you!
- Alejandro
Alejandro S. Canosa
Three Minds Software
Three Minds Software
Re: Import SVG Artwork
The compass rose is from a map I started in Inkscape. Instead of copy it to a new file, I deleted everythin else. That's why those settings are in mm and far from default ^^
It worked now. Thank you
It worked now. Thank you
System information:
- Windows 10 Professional x64
- AMD Ryzen 5 3600XT
- 32GB DDR4 RAM
- Nvidia GeForce 3070 FE
Re: Import SVG Artwork
I'm glad that worked!
We'll still investigate using the "viewbox" as the width/height. I'm trying to remember if there was a reason we didn't
- Alejandro
Alejandro S. Canosa
Three Minds Software
Three Minds Software