Jump to content
You must now use your email address to sign in [click for more info] ×

Affinity Designer: when exporting a vector image to SVG, an file with an image is generated


Recommended Posts

Hello,

I'm trying to export a vector image to SVG and Designer generates an SVG file with a JPEG image on it. The content of the file looks as:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-miterlimit:1;">
    <use id="icon" xlink:href="#_Image1" x="0" y="1.026" width="32px" height="30.214px" transform="matrix(1,0,0,0.974629,0,0)"/>
    <defs>
        <image id="_Image1" width="32px" height="31px" xlink:href="data:image/jpeg;base64,/9j/....."/>
    </defs>
</svg>

I suppose I'm doing something wrong, but I don't what.

Can someone help me?

Thanks in advance.

Patrick

Link to comment
Share on other sites

  • Staff

Hi Patrick8639,

Yes, it's a little more tricky than that because quite a few things are lost when we export to SVG from Affinity in particular the semitransparent area around the blue arrow must be constructed in a very specific way to keep everything as vectors. Unfortunately seems there's a couple more issues/bugs when the layer structure becomes more complex. I will take a look at this more closely during the weekend.

Link to comment
Share on other sites

Yes, it is somewhat difficult to achieve what you want when exporting to SVG. I must say, I am not entirely sure about the perfect way to do this. I believe, however, that you can systematically use the methods described here:

 

https://forum.affinity.serif.com/index.php?/topic/4069-layer-clipping-vs-layer-masking/#comment-16825

 

For instance, you can clip your objects to transparent vector shapes to achieve the desired effect. I used two parent shapes for that purpose. In my screen shot, I assigned them a red fill in order to make them stand out. But of course, you will set the fill to transparent and keep a semi-transparent white stroke on the parent shape with the arrow. Now, when you restructure your document a little and clip your items to these shapes, you can export without rasterising anything. (I clipped everything to a rectangle in addition and exported to web.)

 

Hope that makes sense … :)

Alex

 

Parent-Shapes.png.7fb938bf4653cc0fd2c104ff459ce016.png

 

Clip.png.86875a5d3debc8edb28634fe77d181e2.png

 

Clip.afdesign

Clip.svg

 

 

Link to comment
Share on other sites

Jip this would need some layer restructuring in order to apply the wanted look and effect as plain SVG exported vector objects. - Since SVG doesn't have and support any direct erasing commands per se, this would also have to be done via defined clipPaths, mask and opacity settings when hand coded in SVG.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.