SVG import/export
Open, NormalPublic


"If we're using SVG as our internal file format for vector layers, it makes a lot of sense to also make it possible to import SVG into Krita and export Krita images as SVG. But that's more complicated than it seems! Because we'd need to export our raster layers as well. What is going to happen with clone layers and transform masks... That needs research, but it's sure going to be interesting! And then, when it works, we'll also make sure you can use SVG images in File Layers."


  • SVG export/import for shape/vector layers at the very least.
  • Research which other layers we can export.

Also related: Vector Tool Reported Bugs

Picked as part of the 2016 kickstarter goals!

dkazakov raised the priority of this task from Wishlist to Normal.
woltherav added a subscriber: dkazakov.

@dkazakov, I am assigning you as you are literally working on this right now... Well, the parsing part.

rempt added a subscriber: rempt.Dec 17 2016, 10:12 AM

I've just tested the svg branch, and found a few problems:

  • on saving to .kra the warning dialog pops up, warning about 8 bits/channel and multiple layers. Saving to .kra shouldn't show any warnings, and in master krita doesn't
  • before saving finished, Krita crashed:

IODevice::read (QFile, "/tmp/p25093bla.kra"): WriteOnly device
krita.general: Parsing error in contents.svg ! Aborting!
In line: 1 , column: 0
Error message: "Premature end of document."

krita.general: "Parsing error in the main document at line 1, column 0\nError message: Premature end of document."
krita.lib.flake: the context stack is not empty (current count 1 , expected 0)
krita.general: "[\n0: /home/boud/dev/i-svg/lib64/ [0x7ff42e2a2425]\n1: /home/boud/dev/i-svg/lib64/kritaplugins/ const&)+0x4d) [0x7ff3fc86ec9d]\n2: /home/boud/dev/i-svg/lib64/kritaplugins/ [0x7ff3fc877212]\n3: /home/boud/dev/deps/lib/*, int, int, void)+0x2c1) [0x7ff428bbb441]\n4: /home/boud/dev/deps/lib/*, int, int, void)+0x2c1) [0x7ff428bbb441]\n5: /home/boud/dev/deps/lib/*)+0x32) [0x7ff428bc8c92]\n6: /home/boud/dev/deps/lib/*)+0x64) [0x7ff428bbc7c4]\n7: /home/boud/dev/deps/lib/*, QEvent*)+0x9c) [0x7ff429b81dec]\n8: /home/boud/dev/deps/lib/*, QEvent*)+0x3fa) [0x7ff429b8644a]\n9: /home/boud/dev/i-svg/lib64/*, QEvent*)+0x17) [0x7ff4323ddf37]\n10: /home/boud/dev/deps/lib/*, QEvent*)+0x75) [0x7ff428b918e5]\n11: /home/boud/dev/deps/lib/ [0x7ff428be16ce]\n12: /home/boud/dev/deps/lib/ [0x7ff428be1ac9]\n13: /usr/lib64/ [0x7ff4259d2c84]\n14: /usr/lib64/ [0x7ff4259d2ed8]\n15: /usr/lib64/ [0x7ff4259d2f7c]\n16: /home/boud/dev/deps/lib/<QEventLoop::ProcessEventsFlag>)+0x5c) [0x7ff428be1d5c]\n17: /home/boud/dev/deps/lib/<QEventLoop::ProcessEventsFlag>)+0xfb) [0x7ff428b8fa8b]\n18: /home/boud/dev/deps/lib/ [0x7ff428b977c6]\n19: dev/i-svg/bin/krita(main+0xc7c) [0x40545c]\n20: /lib64/ [0x7ff427cedb25]\n21: dev/i-svg/bin/krita() [0x405cc0]\n]\n"
Segmentation fault

Hi, @rempt!

I guess I've never actually tested saving yet :) Thank you for reminding me! I'll check it ;)

woltherav updated the task description. (Show Details)Feb 22 2017, 6:16 PM