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

PNG image result does not match the SVG source. #59

Closed
bondarenkod opened this issue Jan 29, 2021 · 3 comments
Closed

PNG image result does not match the SVG source. #59

bondarenkod opened this issue Jan 29, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@bondarenkod
Copy link

Hi!
I've come here from Redth/ResizetizerNT#43
I am not sure that the issue is related to this project for 100%, but I tried to run the viewer from the https://github.com/svg-net/SVG repository and it display the image without the difference from the original one.

I have a few icons in the AdobeXD design. I exported them as the SVG files to use them in my project. Usually, everything is OK but not now.
Instead of this result (as it is in the XD)
ApplicationFrameHost_29_01_2021__22_44_07__e0926005-3114-45fe-be9e-ee741f1c7136
images I see only the central icons without any background:

explorer_29_01_2021__22_45_12__32993bbf-03e8-4377-a0d0-6631aa7a9bf2

After a short research I dig to the original svg-net/SVG project and run the Viewer:
SVGViewer_29_01_2021__22_21_26__0679a4a5-acc2-4f1f-b734-39f3f2c3b5ac

Then I tried to install and run the tool from the Windows Console:
Svg.Skia.Converter -f L:\src_github\ResizetizerNT\Resizetizer.NT.Tests\images\issue_43_0.svg -o "L:\" --format png

Here is the result:
issue_43_0 (it's invisible on the light page)
Here is the screenshot of the file:
explorer_29_01_2021__22_50_05__40397e26-7fd7-4694-ae05-335e2afb577a

I've also tried to run the code from .net console project, the result was the same.
svg.Save("image.png", SKColors.Empty, SKEncodedImageFormat.Png, 100, 1f, 1f);
svg.Save("image.png", SKColors.Transparent, SKEncodedImageFormat.Png, 100, 1f, 1f);
Only when I change the background color parameter from any transparent value
svg.Save("image.png", SKColors.Green, SKEncodedImageFormat.Png, 100, 1f, 1f);
I start getting a different result:
image

Could you help me with the issue? Should I go to the svg-net/SVG project and create an issue there?

I pack all the SVG, including the XD file into this zip:
issue_43_0.zip

@wieslawsoltes
Copy link
Owner

It's bug in filter rendering.

@wieslawsoltes
Copy link
Owner

@bondarenkod I think I have fixed this issue. The fix is in the master branch right now. Will do NuGet release soon.

@wieslawsoltes
Copy link
Owner

This should be fixed in 0.5.7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants