Redth / ResizetizerNT

Add SVG's and PNG's to your shared Xamarin Project
MIT License
318 stars 31 forks source link

png of svg is a black square. #39

Closed Alex-451 closed 3 years ago

Alex-451 commented 3 years ago

This svg: (Zip because svg is not supported) viral.zip

Gets turned into this png: (Just a black square) viral

With a different svg it works just fine. So is there something wrong with my svg, and how do i fix it?

bondarenkod commented 3 years ago

I've added an example with your's SVG image I've also found a few other SVGs with converting issues.

vmware_29_01_2021__17_19_43__982125a6-b087-4683-8642-713d0079687f

https://github.com/bondarenkod/ResizetizerNT_issues1

Alex-451 commented 3 years ago

Interesting, i wonder what causes that issue.

bondarenkod commented 3 years ago

I'll try to debug it later.

Alex-451 commented 3 years ago

I could also look into that issue if its not too hard, contrebuiting to this awesome library would be awesome.

bondarenkod commented 3 years ago

@AlexGipp explorer_29_01_2021__21_49_41__82956e31-4077-4df5-acb7-87d9fc9fb8ec using this tool https://github.com/RazrFalcon/svgcleaner (gui in the same repo) I have two ideas:

bondarenkod commented 3 years ago

I've checked your file using the viewer from the original SVG library It is display nothing https://github.com/svg-net/SVG SVGViewer_29_01_2021__22_23_24__23bd3890-98bf-4ed8-9993-92e997748d40

Alex-451 commented 3 years ago

Those svgs are probably valid though (if i didnt fuck something up), i just copied the tag from this website: https://nindo.de/ Capture

bondarenkod commented 3 years ago

@AlexGipp I fixed your SVG. image Once I replaced the currentColor with the orange the SVGCleaner tool stopped sending me warnings. image And now I see the image in the app.

Alex-451 commented 3 years ago

Interesting thanks for figuring that out!