Bug 333451

Summary: Krita cannot import SVG as editable vectors
Product: [Applications] krita Reporter: Rafael Linux User <rafael.linux.user>
Component: File formatsAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: halla, kossebau, rafael.linux.user
Priority: NOR    
Version: 2.8.1   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: attachment-28049-0.html
attachment-13014-0.html
attachment-16055-0.html
no_dialog_ box.png

Description Rafael Linux User 2014-04-15 09:57:33 UTC
Krita 2.8.1-21.6  /  KDE 4.12.4
SVG files

Reproducible: Always

Steps to Reproduce:
1. Open an SVG file

Actual Results:  
- Image not visible or only some part of image is showed, till you try to move it. In this case, cropped on the right.
(try with http://upload.wikimedia.org/wikipedia/commons/2/20/Google-Logo.svg)
- Many times, image is showed vertically double sized
(try with http://openclipart.org/download/people/netalloy/eco_car.svg)
- Often trying to crop a selected part of imported SVG, make a crop of some other area, not selected one.
(try with http://openclipart.org/people/lpr577/earthworm.svg)


Expected Results:  
Import SVG like scalable objects respecting their size, proportionality and showed just on loading it. 


Although is AWESOME that Krita import SVG like vector objects (on the contrary to raster like "other" software do) it's still not working fine, like you can experiment.
Comment 1 Halla Rempt 2014-04-15 09:59:37 UTC
Yes... Basically, we convert SVG to ODG and then show that as vector layers, and a lot of information gets lost...

See also: https://bugs.kde.org/show_bug.cgi?id=322377, https://bugs.kde.org/show_bug.cgi?id=309409
Comment 2 Rafael Linux User 2014-04-15 12:10:36 UTC
One more thing not working:

If I drag and drop a SVG file, Krita ask me what to do. If I choose "insert as new layer", nothing happens.  : (
Comment 3 Halla Rempt 2014-06-26 08:29:45 UTC
Yes, that's yet another bug.
Comment 4 Halla Rempt 2014-06-26 09:00:15 UTC
Git commit 8731c7187f498d9e3b35e1ec45b519e28817ab1f by Boudewijn Rempt.
Committed on 26/06/2014 at 08:58.
Pushed by rempt into branch 'master'.

Add basic svg support to the vector shape

This is useful in two cases:

* when the conversion from svg to odg through karbon gives bad results
* when the user wants to handle an svg image as a single vector object.

M  +20   -0    plugins/vectorshape/VectorShape.cpp
M  +4    -1    plugins/vectorshape/VectorShape.h
M  +2    -1    plugins/vectorshape/VectorShapeConfigWidget.cpp
M  +1    -0    plugins/vectorshape/VectorShapeFactory.cpp
M  +1    -1    plugins/vectorshape/VectorTool.cpp
M  +1    -1    plugins/vectorshape/VectorToolFactory.cpp

http://commits.kde.org/calligra/8731c7187f498d9e3b35e1ec45b519e28817ab1f
Comment 5 Halla Rempt 2014-11-05 13:35:20 UTC
*** Bug 340379 has been marked as a duplicate of this bug. ***
Comment 6 Halla Rempt 2015-01-03 20:11:32 UTC
For now, we cannot load svg outside the vector shape. We need our own filter for this, instead of relying on karbon to handle it. The vector shape still can load svg, though. Proper svg support is a big project...
Comment 7 Halla Rempt 2016-01-24 15:51:23 UTC
WISHGROUP: Vector kickstarter main project
Comment 8 Rafael Linux User 2016-01-24 17:32:46 UTC
Created attachment 96816 [details]
attachment-28049-0.html

I cant understand what is that?

El dom., 24 de enero de 2016 16:51, Boudewijn Rempt via KDE Bugzilla <
bugzilla_noreply@kde.org> escribió:

> https://bugs.kde.org/show_bug.cgi?id=333451
>
> --- Comment #7 from Boudewijn Rempt <boud@valdyas.org> ---
> WISHGROUP: Vector kickstarter main project
>
> --
> You are receiving this mail because:
> You reported the bug.
> You are on the CC list for the bug.
>
Comment 9 Halla Rempt 2016-01-24 19:52:50 UTC
We've been triaging all wishes today, and yours was classified as part of the next big kickstarter topics: improving vector tools.
Comment 10 Rafael Linux User 2016-01-25 11:30:48 UTC
Created attachment 96828 [details]
attachment-13014-0.html

I understand now. I think it is more that a wish, it's a must, cause I
still need to use nowadays GIMP to import SVG files in my images.

Thank you

;)

El dom., 24 ene. 2016 a las 20:52, Boudewijn Rempt via KDE Bugzilla (<
bugzilla_noreply@kde.org>) escribió:

> https://bugs.kde.org/show_bug.cgi?id=333451
>
> --- Comment #9 from Boudewijn Rempt <boud@valdyas.org> ---
> We've been triaging all wishes today, and yours was classified as part of
> the
> next big kickstarter topics: improving vector tools.
>
> --
> You are receiving this mail because:
> You reported the bug.
> You are on the CC list for the bug.
>
Comment 11 Halla Rempt 2016-01-25 12:01:32 UTC
In Krita 2.9, you can already import SVG as non-editable vector image shapes.
Comment 12 Rafael Linux User 2016-01-25 12:35:51 UTC
Created attachment 96829 [details]
attachment-16055-0.html

Sorry Bodewijn, but the fact is, at least in Krita 2.9.10 in OpenSUSE 42.1,
that Krita is still asking about what file type is an SVG if I try to drag
a drop a SVG inside Krita or as a layer so, finally I can't import any SVG
file.  :(

El lun., 25 ene. 2016 a las 13:01, Boudewijn Rempt via KDE Bugzilla (<
bugzilla_noreply@kde.org>) escribió:

> https://bugs.kde.org/show_bug.cgi?id=333451
>
> --- Comment #11 from Boudewijn Rempt <boud@valdyas.org> ---
> In Krita 2.9, you can already import SVG as non-editable vector image
> shapes.
>
> --
> You are receiving this mail because:
> You reported the bug.
> You are on the CC list for the bug.
>
Comment 13 Halla Rempt 2016-01-25 14:03:00 UTC
It's far from ideal, but here's how to do it:

Enable the Add Shape Docker
Add a Vector shape
In the dialog that opens, press the ... button
In the file dialog select the SVG file you want to add and press OK
press OK

Now you've got an svg object on your vector layer. You can rotate, stretch, move it, but not edit it.
Comment 14 Rafael Linux User 2016-01-25 16:19:14 UTC
Created attachment 96833 [details]
no_dialog_ box.png

I am trying several times to follow your steps, but I don't see any "..."
icon or dialog appearing in no place.

Anyway, I think this is a complicated way to load SVG files. Why do not
create a "Drag and drop" method that will create automatically the shape
layer?
…
[image: no_dialog_ box.png]

El lun., 25 ene. 2016 a las 15:03, Boudewijn Rempt via KDE Bugzilla (<
bugzilla_noreply@kde.org>) escribió:

> https://bugs.kde.org/show_bug.cgi?id=333451
>
> --- Comment #13 from Boudewijn Rempt <boud@valdyas.org> ---
> It's far from ideal, but here's how to do it:
>
> Enable the Add Shape Docker
> Add a Vector shape
> In the dialog that opens, press the ... button
> In the file dialog select the SVG file you want to add and press OK
> press OK
>
> Now you've got an svg object on your vector layer. You can rotate, stretch,
> move it, but not edit it.
>
> --
> You are receiving this mail because:
> You reported the bug.
> You are on the CC list for the bug.
>
Comment 15 Halla Rempt 2017-03-24 11:19:37 UTC
Implemented in the svg branch
Comment 16 Rafael Linux User 2017-03-27 22:48:31 UTC
Thank you Boudewijn
I'm willing to try this new feature working!!!