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
While experimenting with generating low-res (highly pixellated through renpy.display.module.pixellate) image placeholders for RenPyWeb with on-demand resource download, generated from the Laucher, I needed an efficient way to save such placeholders on disk (for inclusion in game.zip, downloaded on game startup).
The JPG function is not well suited for this: even with a 0 quality the file size is still pretty high compared to other options.
The PNG function works but does not compare with e.g. GIMP or ImageMagick wrt size efficiency (which requires some PNG line filters heuristic and/or brute-force AFAIU). In addition, it does not support 8-bit colors which would help in this context.
There is no WEBP support, and my tests indicate that this format would be more size-efficient for saving such placeholders on disk. So adding WEBP support to pygame_sdl2.image.save would help.
I may or may not find another trick to save image placeholders efficiently (I plan to experiment with shrinking+scaling back).
I'm tentatively posting this to know whether WEBP saving support would be welcome.
The text was updated successfully, but these errors were encountered:
Hi,
While experimenting with generating low-res (highly pixellated through
renpy.display.module.pixellate
) image placeholders for RenPyWeb with on-demand resource download, generated from the Laucher, I needed an efficient way to save such placeholders on disk (for inclusion in game.zip, downloaded on game startup).The JPG function is not well suited for this: even with a 0 quality the file size is still pretty high compared to other options.
The PNG function works but does not compare with e.g. GIMP or ImageMagick wrt size efficiency (which requires some PNG line filters heuristic and/or brute-force AFAIU). In addition, it does not support 8-bit colors which would help in this context.
There is no WEBP support, and my tests indicate that this format would be more size-efficient for saving such placeholders on disk. So adding WEBP support to
pygame_sdl2.image.save
would help.I may or may not find another trick to save image placeholders efficiently (I plan to experiment with shrinking+scaling back).
I'm tentatively posting this to know whether WEBP saving support would be welcome.
The text was updated successfully, but these errors were encountered: