Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest Nuget version can not load images - BUG #1101

Closed
rasmus-s opened this issue Nov 16, 2023 · 7 comments · Fixed by #1102
Closed

Latest Nuget version can not load images - BUG #1101

rasmus-s opened this issue Nov 16, 2023 · 7 comments · Fixed by #1102

Comments

@rasmus-s
Copy link

Description

After upgrading from Nuget v. 3.4.4 to 3.4.5 SVG can not load images. It has been working in ALL other nuget versions.
It fails with message: Error: 0 : Error loading image: 'https://www.w3.org/Icons/SVG/svg-logo-v.png', error: The header name 'image/svg+xml' has an invalid format.

Example data

SVG

<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100" height="100">
  <image xlink:href="https://www.w3.org/Icons/SVG/svg-logo-v.png" height="100" width="100" />
</svg>

Code:

var svgDocument = SvgDocument.Open<SvgDocument>(stream);
var bitmap = svgDocument.Draw();

Used Versions

Nuget version: 3.4.5 - FAILS with - "Error: 0 : Error loading image: 'https://www.w3.org/Icons/SVG/svg-logo-v.png', error: The header name 'image/svg+xml' has an invalid format."

Nuget version: 3.4.4 - Working

@mrbean-bremen
Copy link
Member

mrbean-bremen commented Nov 16, 2023

What platform and framework are you using?

@rasmus-s
Copy link
Author

@mrbean-bremen - Windows 10 x64 and .Net 7

@mrbean-bremen
Copy link
Member

mrbean-bremen commented Nov 16, 2023

@H1Gdev - please also have a look. I will check if I can reproduce the problem later tonight, but given that all tests have been passing I doubt it - so currently I have no real idea what went wrong. Also, I have no idea where thisa 'image/svg+xml' comes from.

@rasmus-s
Copy link
Author

I made a simple Console app to reproduce it.
It can be downloaded here: SVGTestConsoleApp.zip

As it can see on this image, the "output"-window shows the error. Note the output svg.png is just black.
image

@mrbean-bremen
Copy link
Member

I will make another bugfix release soon, as this was a regression.

github-actions bot pushed a commit that referenced this issue Nov 16, 2023
…ildProcessTemplates CONTRIBUTING.md Generators Nuget README.md Samples Source Svg.Custom Tests doc docfx.json index.md license.txt fixes #1101
@mrbean-bremen
Copy link
Member

The new release is online.

@rasmus-s
Copy link
Author

Can confirm its working with latest nuget package. Thanks for fast actions 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants