Bug 392935

Summary: Can't Copy/Paste vector object from Inkscape to Krita on Windows-10
Product: [Applications] krita Reporter: Ahab Greybeard <ahab.greybeard>
Component: Layers/VectorAssignee: Halla Rempt <halla>
Status: RESOLVED FIXED    
Severity: normal CC: halla
Priority: NOR    
Version First Reported In: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Ahab Greybeard 2018-04-09 15:19:21 UTC
This fault was noted by a forum user and was not present on Windows-7 but was present when using Windows-10.
https://forum.kde.org/viewtopic.php?f=139&t=151766

It is not present in the Linux releases but is present in the 4.0.0 Windows release and the latest Windows nightly build (g82a8db752).

If a vector object is copied in Inkscape and then pasted in Krita, it is pasted as a paint layer, i.e a raster image.

A mitigation for this is to Save As a plain svg file (.svg) from within Inkscape and then to open that .svg file in Krita. If more than one vector object is present then they need to be Ungrouped. After this, individual vector objects can be properly copied and pasted to another open Krita image as a vector layer.
Comment 1 Halla Rempt 2018-04-09 15:52:45 UTC
I can confirm the issue. I think that Windows 10 adds a rasterized version of the svg to the mimedata on the clipboard.
Comment 2 Halla Rempt 2020-04-10 11:16:51 UTC
Yes... The following mimetypes are in an inkscape paste on Windows:

[14128] ("image/x-inkscape-svg", "application/x-qt-windows-mime;value=\"PNG\"", "application/x-qt-image")

While krita expects 

mage/svg+xml
Comment 3 Halla Rempt 2020-04-10 11:33:12 UTC
Fixed in 

commit 3145ca09146ec84958799fd15b4cd0ddd32ac7fb (HEAD -> master, origin/master, origin/HEAD)
Author: Boudewijn Rempt <boud@valdyas.org>
Date:   Fri Apr 10 11:27:27 2020 +0100

    Fix pasting SVG as vectors on Windows
    
    On Windows, inkscape puts the following mimetypes on the clipboard:
    
    "image/x-inkscape-svg"
    "application/x-qt-windows-mime;value=\"PNG\"" "application/x-qt-image"
    
    While krita expected
    
    "image/svg+xml"
    
    Now we just look through all formats to see whether there's one htat
    says 'svg' and then use that data