SVG import/export
Open, NormalPublic

Description

"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."

Implies:

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

Bug: https://bugs.kde.org/show_bug.cgi?id=333451
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/libkritaglobal.so.16(kisBacktrace()+0x35) [0x7ff42e2a2425]\n1: /home/boud/dev/i-svg/lib64/kritaplugins/kritaanimationdocker.so(KisTimeBasedItemModel::setPlaybackRange(KisTimeRange const&)+0x4d) [0x7ff3fc86ec9d]\n2: /home/boud/dev/i-svg/lib64/kritaplugins/kritaanimationdocker.so(TimelineFramesView::slotSelectionChanged()+0xe2) [0x7ff3fc877212]\n3: /home/boud/dev/deps/lib/libQt5Core.so.5(QMetaObject::activate(QObject*, int, int, void)+0x2c1) [0x7ff428bbb441]\n4: /home/boud/dev/deps/lib/libQt5Core.so.5(QMetaObject::activate(QObject*, int, int, void)+0x2c1) [0x7ff428bbb441]\n5: /home/boud/dev/deps/lib/libQt5Core.so.5(QTimer::timerEvent(QTimerEvent*)+0x32) [0x7ff428bc8c92]\n6: /home/boud/dev/deps/lib/libQt5Core.so.5(QObject::event(QEvent*)+0x64) [0x7ff428bbc7c4]\n7: /home/boud/dev/deps/lib/libQt5Widgets.so.5(QApplicationPrivate::notify_helper(QObject*, QEvent*)+0x9c) [0x7ff429b81dec]\n8: /home/boud/dev/deps/lib/libQt5Widgets.so.5(QApplication::notify(QObject*, QEvent*)+0x3fa) [0x7ff429b8644a]\n9: /home/boud/dev/i-svg/lib64/libkritaui.so.16(KisApplication::notify(QObject*, QEvent*)+0x17) [0x7ff4323ddf37]\n10: /home/boud/dev/deps/lib/libQt5Core.so.5(QCoreApplication::notifyInternal2(QObject*, QEvent*)+0x75) [0x7ff428b918e5]\n11: /home/boud/dev/deps/lib/libQt5Core.so.5(QTimerInfoList::activateTimers()+0x54e) [0x7ff428be16ce]\n12: /home/boud/dev/deps/lib/libQt5Core.so.5(+0x2d1ac9) [0x7ff428be1ac9]\n13: /usr/lib64/libglib-2.0.so.0(g_main_context_dispatch+0x254) [0x7ff4259d2c84]\n14: /usr/lib64/libglib-2.0.so.0(+0x4bed8) [0x7ff4259d2ed8]\n15: /usr/lib64/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7ff4259d2f7c]\n16: /home/boud/dev/deps/lib/libQt5Core.so.5(QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x5c) [0x7ff428be1d5c]\n17: /home/boud/dev/deps/lib/libQt5Core.so.5(QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)+0xfb) [0x7ff428b8fa8b]\n18: /home/boud/dev/deps/lib/libQt5Core.so.5(QCoreApplication::exec()+0x86) [0x7ff428b977c6]\n19: dev/i-svg/bin/krita(main+0xc7c) [0x40545c]\n20: /lib64/libc.so.6(__libc_start_main+0xf5) [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