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

Export of layer effects (in SVG?) bug


Recommended Posts

It seems that exporting an object in SVG Format with native colour is not the same than exporting the same object in SVG with an overlay colour as a layer effect. At least browsers (Opera/Firefox) don't recognise the additional overlay colour from the layer effects - they still think the object has the native (original) colour. Nasty bug - took me a long time to figure out it's not a wordpress thumbnail handling issue but an original Affinity Designer file bug! Some programs display the files properly - so there must be some detail in the object description in the file format that is written different by AD

Cheers, Timo.

CRM.png.a048d588572393102ac3cc403bfa8af7.png

 i7-12700KF, 3.60 GHz, 32GB RAM, SSD, NVIDIA GeForce RTX 3070, Wacom Intuos 4 Tablet, Windows 11 Pro - AP, AD and APublisher V1 and V2
https://www.timobierbaum.com

Link to comment
Share on other sites

9 hours ago, DarkClown said:

Some programs display the files properly - so there must be some detail in the object description in the file format that is written different by AD

If some programs display it correctly, perhaps the bug is in the programs that don't, rather than in AD?

In any case, a quick test just worked for me in Firefox, so how about a sample .afdesign file and the exported SVG to demonstrate the problem? Also, perhaps some details about the Export settings would be useful.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

2 hours ago, walt.farrell said:

If some programs display it correctly, perhaps the bug is in the programs that don't, rather than in AD?

In any case, a quick test just worked for me in Firefox, so how about a sample .afdesign file and the exported SVG to demonstrate the problem? Also, perhaps some details about the Export settings would be useful.

Hi Walt,

It might be a combination from what my Wordpress Elementor Widget interprets from the SVG file and what AD produces. It's a fact that exporting an object with native color produces a different file than an object with a layer overlay colour. (And this is caused by AD!) - Unless overlay colours are a feature of the SVG format (what I don't think) I assume there is a bug in AD at least as well.

This is what I generated in AD:

Original.png.9e966be47333f0fd922121533a7a73c7.png

Here are the layer settings:

Designer_Cg609ZGaGp.png.abb736b4832ec15e084e8c158969822d.png

 

And this is what I get to see in Wordpress:

opera_ZpnT3YwoqB.png.56a458cdc4488c8e7ced5216a22161cf.png

 

(The "fork" is part of an Element I used in a different Icon Box before in wordpress)

The only thing that is different in the third box is the colour overlay information ... this shouldn't result in a difference in the export format (SVG).

Here's the original designer file:

AD Test2.afdesign

As I said - displayed properly by many other programs - but the SVG Format shouldn't make a difference between a native colour and an overlay colour.

I exported selected objects without background.

Cheers, Timo

CRM.png.a048d588572393102ac3cc403bfa8af7.png

 i7-12700KF, 3.60 GHz, 32GB RAM, SSD, NVIDIA GeForce RTX 3070, Wacom Intuos 4 Tablet, Windows 11 Pro - AP, AD and APublisher V1 and V2
https://www.timobierbaum.com

Link to comment
Share on other sites

15 hours ago, DarkClown said:

It seems that exporting an object in SVG Format with native colour is not the same than exporting the same object in SVG with an overlay colour as a layer effect. At least browsers (Opera/Firefox) don't recognise the additional overlay colour from the layer effects - they still think the object has the native (original) colour. Nasty bug - took me a long time to figure out it's not a wordpress thumbnail handling issue but an original Affinity Designer file bug! Some programs display the files properly - so there must be some detail in the object description in the file format that is written different by AD

You do know that the element with an overlay FX is exported as a bitmap - is rasterized? All elements with effects will be rasterized in Affinity. Some sort of colour management difference between vector and bitmap could affect the presentation of the contents on your system. Just a wild guess.

On my computer opening the SVG in Chrome, Firefox or even Adobe Photoshop CC 2020 etc. renders the greens identically. In a heavily colour managed setup btw.

  • "The user interface is supposed to work for me - I am not supposed to work for the user interface."
  • Computer-, operating system- and software agnostic; I am a result oriented professional. Look for a fanboy somewhere else.
  • “When a wise man points at the moon the imbecile examines the finger.” ― Confucius
  • Not an Affinity user og forum user anymore. The software continued to disappoint and not deliver.
Link to comment
Share on other sites

12 minutes ago, Jowday said:

You do know that the element with an overlay FX is exported as a bitmap - is rasterized? All elements with effects will be rasterized in Affinity.

Well ... I export as SVG (and that should be vector format - not bitmap) - but if SVG can contain rasterized bitmap content as well I have to admit: Nope ... that's new ... but will explain things. In that case the problem could be related to the WP Elementor Widget that is not capable of handling bitmaps in SVG vector format the right way ...
(Frankly spoken I'm a bit surprised that the overlay should come as bitmap - very unexpected when you work vector based and export in a vector format).
I wonder if Illustrator exports overlay FX as bitmap as well - or is it an Affinity specific behaviour? ...

CRM.png.a048d588572393102ac3cc403bfa8af7.png

 i7-12700KF, 3.60 GHz, 32GB RAM, SSD, NVIDIA GeForce RTX 3070, Wacom Intuos 4 Tablet, Windows 11 Pro - AP, AD and APublisher V1 and V2
https://www.timobierbaum.com

Link to comment
Share on other sites

10 minutes ago, Jowday said:

On my computer opening the SVG in Chrome, Firefox or even Adobe Photoshop CC 2020 etc. renders the greens identically.

On my laptop, too.

It might be interesting to see the actual file that was used for WordPress, in case there's some other difference that explains the different color.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

I attached the actual SVG file that displays wrong in the WP Elementor Widget in the post before. The more I dig deeper in this it seems to be a combination from what AD writes as SVG and a buggy interpretation of this SVG format from the widget.

The different colour is not the problem - the "new" green" is taken from an SVG file I used in another Icon-Box on the same page (so the green is just taken from another SVG file and could as well be any other random colour). I will have to deal with the Elementor guys as well on the topic.

The Affinity topic from my perspective is: why is the Exported SVG different, when an object uses an layered FX than with the native colour?

CRM.png.a048d588572393102ac3cc403bfa8af7.png

 i7-12700KF, 3.60 GHz, 32GB RAM, SSD, NVIDIA GeForce RTX 3070, Wacom Intuos 4 Tablet, Windows 11 Pro - AP, AD and APublisher V1 and V2
https://www.timobierbaum.com

Link to comment
Share on other sites

12 minutes ago, DarkClown said:

I attached the actual SVG file that displays wrong in the WP Elementor Widget in the post before.

If you did, I don't see it. Sorry if I've missed it. You had a screenshot from WordPress, and an .afdesign file, but I did not see an SVG file corresponding to the screenshot.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

Thanks. That's still not the one from WordPress (as it's got a rectangle rather than the fork/arc). And still looks good in browsers, but it's nice to confirm that :)

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

Looks like i'm dealing with extended complexity...
The problem only occurs from the second SVG Icon on I use in the WP Icon Box. Someone from the Elementor forum gave a good hint for the cause of the problem:

 

Quote

Check your CSS classes and Id's that they are not overwriting each other, for example in the svg you provided it has a use element
<use xlink:href="#_Image1" x="346.549" y="50.679" width="166.08px" height="166.08px" transform="matrix(0.994491,0,0,0.994491,0,0)"/>

which in turn uses <image id="_Image1" width="167px" height="167px" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKcAAACnCAYAAAB0FkzsAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAB1UlEQVR4nO3SIQEAIADAMMDTPy4kQHOxJbj4HGefAUHrdwC8mJMsc5JlTrLMSZY5yTInWeYky5xkmZMsc5JlTrLMSZY5yTInWeYky5xkmZMsc5JlTrLMSZY5yTInWeYky5xkmZMsc5JlTrLMSZY5yTInWeYky5xkmZMsc5JlTrLMSZY5yTInWeYky5xkmZMsc5JlTrLMSZY5yTInWeYky5xkmZMsc5JlTrLMSZY5yTInWeYky5xkmZMsc5JlTrLMSZY5yTInWeYky5xkmZMsc5JlTrLMSZY5yTInWeYky5xkmZMsc5JlTrLMSZY5yTInWeYky5xkmZMsc5JlTrLMSZY5yTInWeYky5xkmZMsc5JlTrLMSZY5yTInWeYky5xkmZMsc5JlTrLMSZY5yTInWeYky5xkmZMsc5JlTrLMSZY5yTInWeYky5xkmZMsc5JlTrLMSZY5yTInWeYky5xkmZMsc5JlTrLMSZY5yTInWeYky5xkmZMsc5JlTrLMSZY5yTInWeYky5xkmZMsc5JlTrLMSZY5yTInWeYky5xkmZMsc5JlTrLMSZY5yTInWeYky5xkmZMsc5JlTrLMSZY5yTInWeYky5xkmZMsc5JlTrLMSZY5ybo7tgNZJ/FguAAAAABJRU5ErkJggg=="/> (green by the way)

So if you have another SVG in that same page which has a <use> element that calls the same ID (_Image1) it will use this same image, and if you happen to have another <image> element again with the same id (_Image1) it will overwrite all calls of that ID.

The way I generated the SVG was basically using the same original picture and only changing the overlay FX colour to generate a different coloured SVG - So if the following derivatives of SVG icons uses the same "_Image1" coding this might lead to overwritten content ... but I don't fully get the cause of the problem.

CRM.png.a048d588572393102ac3cc403bfa8af7.png

 i7-12700KF, 3.60 GHz, 32GB RAM, SSD, NVIDIA GeForce RTX 3070, Wacom Intuos 4 Tablet, Windows 11 Pro - AP, AD and APublisher V1 and V2
https://www.timobierbaum.com

Link to comment
Share on other sites

And, as you can see from my description - the file is the same ... but for the 3rd square (the one with the fx-overlay) WP simply uses a different SVG Icon with the same ID to display it ... (so the fork has never been part of the original file

CRM.png.a048d588572393102ac3cc403bfa8af7.png

 i7-12700KF, 3.60 GHz, 32GB RAM, SSD, NVIDIA GeForce RTX 3070, Wacom Intuos 4 Tablet, Windows 11 Pro - AP, AD and APublisher V1 and V2
https://www.timobierbaum.com

Link to comment
Share on other sites

59 minutes ago, DarkClown said:

And, as you can see from my description - the file is the same ... but for the 3rd square (the one with the fx-overlay) WP simply uses a different SVG Icon with the same ID to display it ... (so the fork has never been part of the original file

So, perhaps you should edit the SVG file that AD produced using your favorite text editor, and change both those occurrences of image1 to something unique.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

So you are suggesting I should manually edit the source code of every icon SVG file I produced with AD to get it working in the field?

That's a "creative" workaround ... 

CRM.png.a048d588572393102ac3cc403bfa8af7.png

 i7-12700KF, 3.60 GHz, 32GB RAM, SSD, NVIDIA GeForce RTX 3070, Wacom Intuos 4 Tablet, Windows 11 Pro - AP, AD and APublisher V1 and V2
https://www.timobierbaum.com

Link to comment
Share on other sites

19 minutes ago, DarkClown said:

So you are suggesting I should manually edit the source code of every icon SVG file I produced with AD to get it working in the field?

That's a "creative" workaround ... 

Well, alternatively, you could edit the icon you're using on WordPress that conflicts with it.

SVG files are text, and if you mix and match different SVG files on the same website it seems (based on your experience) that you could have conflicts. 

Unless each application creating the files generates guaranteed unique names for everything, such conflicts will be possible and will have to be handled manually.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

24 minutes ago, DarkClown said:

 

Or, perhaps you just need to change your object names in AD do they don't conflict with your other WordPress files.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

  • Staff

I'm going to move this to questions as this is not a bug in the app, but a side effect of the object having to be rasterised (because the Filter Effects usage) and the property name clashing with another SVG on the Wordpress site containing content that has been rasterised.

Link to comment
Share on other sites

On 1/19/2020 at 7:26 PM, DarkClown said:

I wonder if Illustrator exports overlay FX as bitmap as well - or is it an Affinity specific behaviour? ...

Illustrator generally is good at preserving as much as possible as vectors. In this case it wouldn’t rasterize. Allthough you would achive the same effect from the appearance panel using a fill on a group fx. This is not possible in Affinity.

If you add an effect to a group (fx glow) of elements in Affinity the entire group is rasterized into one image. Illustrator only rasterizes the glow and all elements are preserved as vector when exporting.

There is even a vector free perspective option in Illustrator in the FX panel. ;-)

  • "The user interface is supposed to work for me - I am not supposed to work for the user interface."
  • Computer-, operating system- and software agnostic; I am a result oriented professional. Look for a fanboy somewhere else.
  • “When a wise man points at the moon the imbecile examines the finger.” ― Confucius
  • Not an Affinity user og forum user anymore. The software continued to disappoint and not deliver.
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.