You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This one among many has some droop going on, most notably at the wrist:
This flag of Serbia looks half plucked:
This cog is also very droopy, unevenly so in its center:
Apparently related to the number of points:
Spyder's splash screen should have white text and a transparent gradient revealing a laptop presentation in the top half:
This folder SVG leaves its contents in the dark:
Left Chrome, right PyGame:
This flag of Montenegro is missing the top yellow bar:
Chrome 123.0.6312.122 (Official Build) (64-bit) and their respective apps show those SVGs properly.
>pip show pygame
Name: pygame
Version: 2.5.2
>python
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)] on win32
demo.py
fromioimportBytesIOfromPILimportImage# pillowimportpygamename="shrubbery.svg"surface=pygame.image.load(name)
pygame.image.save(surface, name+".png") # Works fine with SVG.bf=BytesIO()
# pygame.image.save(surface, bf) # PNG - ZIP according to IrfanView. Corrupts SVG!pygame.image.save(surface, bf, "png") # Now the droopy SVGs are fine.im=Image.open(bf)
im.show()
The text was updated successfully, but these errors were encountered:
CTimmerman
changed the title
Some SVGs have malformed outputs
Some SVGs have malformed outputs on save
Apr 16, 2024
CTimmerman
changed the title
Some SVGs have malformed outputs on save
Some SVGs have malformed outputs on save to BytesIO without namehint
Apr 16, 2024
CTimmerman
changed the title
Some SVGs have malformed outputs on save to BytesIO without namehint
Some SVGs don't display correctly
Apr 20, 2024
The SVG support is very limited. Unfortunately. It’s a mini svg renderer which works on only some things. The use case is when you’re constructing your SVG with the knowledge of what works.
pygame uses SDL image, which uses nanosvg.
It might be better to try something else for your use.
This one among many has some droop going on, most notably at the wrist:
This flag of Serbia looks half plucked:
This cog is also very droopy, unevenly so in its center:
Apparently related to the number of points:
Spyder's splash screen should have white text and a transparent gradient revealing a laptop presentation in the top half:
This folder SVG leaves its contents in the dark:
Left Chrome, right PyGame:
This flag of Montenegro is missing the top yellow bar:
Chrome 123.0.6312.122 (Official Build) (64-bit) and their respective apps show those SVGs properly.
demo.py
The text was updated successfully, but these errors were encountered: