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

Neither Designer nor Photo opens this SVG correctly


GarryP

Recommended Posts

Windows 10 Home 1903, Photo 1.7.1.404 and Designer 1.7.1.404.

As part of an experiment I (fairly randomly) found an SVG https://pixabay.com/vectors/car-black-vehicle-transport-travel-311713/ that I wanted to use but upon opening it in Photo and Designer (haven’t bothered trying Publisher) I see that it hasn’t been imported correctly. A lot of the detail is missing and there are bigger issues – see attached snapshots from Designer and Photo.
It’s not a big problem for me as I can use the raster version instead but I thought I’d mention it so someone can look into it (there’s a chance that the original SVG is to blame so it might not be an Affinity problem).

black-car-designer.png

black-car-photo.png

Link to comment
Share on other sites

  • 11 months later...
  • Staff

We have made fixes/improvements to this area (Some SVG files do not open correctly) of the program in the latest release.

The fixes and how to update are described in these forum posts.

We would appreciate you checking that this issue has now been resolved for you.

Patrick Connor
Serif Europe Ltd

"There is nothing noble in being superior to your fellow man. True nobility lies in being superior to your previous self."  W. L. Sheldon

 

Link to comment
Share on other sites

Thanks for coming back to this Patrick.
I’ve just placed – in Designer 1.8.4.693 – the graphic I gave a link to in my original post and there has been much improvement.
Some things which I have noticed that still aren’t the same are gradients (windows and others) and the door handles; see attached image (not all differences are marked).
However, I don’t know what the intent was of the original artist and I don’t know how well that intent has come through to the converted PNG image shown on the web site so I can’t say whether the differences I see are correct in the Affinity apps or not (maybe the website isn’t showing the correct image but Designer is).
All-in-all though, it’s looking much better now.
Cheers.

Annotation 2020-08-05 122554-edited.jpg

Link to comment
Share on other sites

  • Staff

The developer added this comment on the issue dealing with many SVGs

Quote

These aren't all the same problem.

swatches.svg is due to a gradient with a single stop.
color-link.svg is due to a gradient with a single stop.
car-311713,svg is due to having the wrong default for gradientUnits.
visualisation,svg is due to having the wrong default for gradientUnits.
chord_diagram.svg has spurious quote marks around url references.
RadialGradient.svg has spurious quote marks around url references.

affinity.svg is due to a feGaussianBlur filter which we currently don't support.

I can fix all except the last one.

So it would seem your outstanding issues are perhaps related to that.. @Sean P can you look to see if  feGaussianBlur is used and if not make a new issue with GarryP's comments regarding gradients

Patrick Connor
Serif Europe Ltd

"There is nothing noble in being superior to your fellow man. True nobility lies in being superior to your previous self."  W. L. Sheldon

 

Link to comment
Share on other sites

Are you aware of a good SVG validator which we can use before submitting apparent issues with placed SVGs?
It might be nice if we could do some checking ourselves to see if the SVG was ‘bad’ before submitting a problem (when the problem isn’t really the application’s problem).
I found this: https://validator.w3.org/ but the issues it comes up with don’t seem to be the same as those mentioned by the developer in your quote, e.g. (for the SVG I mentioned): Line 345, Column 91: Bad value null for attribute stroke-linecap on SVG element g.
I also found: https://svgcheck.toolforge.org/index.php but that doesn’t find any problems, which seems odd.

Link to comment
Share on other sites

  • Staff

Not really Odd, we have written the SVG parser so although your file is valid it took our parser by surprise, that's all the comment meant, no error on your behalf. Those integrity checkers are helpful thank you

Patrick Connor
Serif Europe Ltd

"There is nothing noble in being superior to your fellow man. True nobility lies in being superior to your previous self."  W. L. Sheldon

 

Link to comment
Share on other sites

  • Staff

Hi GarryP,

Looking at file, the SVG uses elements that aren't supported in Affinity. The main noticable one is in the blue windscreen gradient. The SVG gradients in those areas use the attribute:

spreadMethod="Reflect"

https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/spreadMethod

Reflect means that the gradient is reversed one it has past its edges giving the repeated look you see. Unfortunately there are no features in Affinity to repeat this gradient, so it cannot be accurately portrayed in the software.

The other issue with the darker areas is that they use LinearGradients that have the path defined by 4 points (x1, x2, y1 and y2). This allows for a skewed look on the gradient, unfortunately we're not applying the y1 and y2 points so the gradient doesn't get the skew look. I've attached a simpler SVG that demonstrates this and also attached a picture showing this SVG in Inkscape and Affinity Designer. I'll get this passed on to development to see if that is something that can be done! 

SkewedGradient.PNG

LinearGradient.svg

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.