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

SVG icons doesn't show images inside #83198

Closed
spheras opened this issue Oct 12, 2023 · 5 comments · Fixed by #83281
Closed

SVG icons doesn't show images inside #83198

spheras opened this issue Oct 12, 2023 · 5 comments · Fixed by #83281

Comments

@spheras
Copy link

spheras commented Oct 12, 2023

Godot version

4.2-dev6

System information

Godot v4.2.beta1 - Windows 10.0.22621 - Vulkan (Forward+) - integrated AMD Radeon(TM) Graphics (Advanced Micro Devices, Inc.; 31.0.12044.3) - AMD Ryzen 3 5300U with Radeon Graphics (8 Threads)

Issue description

Checking changes on the Godot v4.2.dev6, also just downloaded beta1 and the same, I advertised that the icon I used in my addon was not rendered correctly. The problem was that this SVG contained a raster image inside and some vectors over. The raster image (body) disappeared from the rendered SVG.

image

The SVG was created with Inkscape, and it was correctly rendered with the last stable release of Godot 4.1.
This is how it is rendered correctly with 4.1.
image

Steps to reproduce

I attached a minimal project, but, really, you only have to get the SVG from there.
Just put the .svg as the icon of the project, and you will see the bad render even in the project manager window.

Minimal reproduction project

a minimal project to reproduce

svgtest.zip

@Calinou
Copy link
Member

Calinou commented Oct 12, 2023

Please check in https://www.thorvg.org/viewer to confirm whether this is a ThorVG regression.

@spheras
Copy link
Author

spheras commented Oct 12, 2023

It seems to be rendered perfectly there:
image

the picture section is detected and rendered.

@fire
Copy link
Member

fire commented Oct 12, 2023

This was one of the features I requested for godot 4.0 will poke around the code and from thorvg. I suspect a png or jpeg code path was modified. @hermet

@hermet
Copy link

hermet commented Oct 13, 2023

the robot-body is desrcibed with png image:

    <image
       width="213.51875"
       height="192.88126"
       preserveAspectRatio="none"
       xlink:href="data:image/png;base64,iVBORw0KGgoAAAA ...

Probably, the godot disabled the png loader of the thorvg in building. @fire @capnm

@capnm
Copy link
Contributor

capnm commented Oct 13, 2023

... I suspect a png or jpeg code path was modified.

No the png/jpg loader was disabled because of size complaints, I will re-enable it in the upcoming ThorVG v0.11.1 PR

@akien-mga akien-mga added this to the 4.2 milestone Oct 16, 2023
ProbablyWorks pushed a commit to ProbablyWorks/godot that referenced this issue Oct 22, 2023
https://github.com/thorvg/thorvg/releases/tag/v0.11.1

Godot related:
+ [SwEngine] Enhanced the quality of the dash line corners.
+ [SVG] Fixed a regression bug related to maskContentUnit,
	userSpaceOnUse/objectBoundingBox.

Fixes godotengine#82982 icons.
Fixes godotengine#83198 svg ← png/jpg.
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.

7 participants