pygame / pygame

🐍🎮 pygame (the library) is a Free and Open Source python programming language library for making multimedia applications like games built on top of the excellent SDL library. C, Python, Native, OpenGL.
https://www.pygame.org
7.34k stars 3.26k forks source link

Does `pygame.image` need `avif` and `jxl` support? #3447

Closed ankith26 closed 1 year ago

ankith26 commented 2 years ago

So I'm currently updating SDL_image to 2.6.x, and it supports two new "optional and external" formats, these are optional because these are slightly heavy libraries, so SDL_image does not include it by default.

I opened this issue to get more input, is anyone rooting for these formats being supported by pygame?

2.1.4 might be a good time to add extra format support if there's demand, for now I will just focus on getting the initial 2.6.2 update done

Starbuck5 commented 2 years ago

How heavy are they?

I'm generally in support. JXL and AVIF are both exciting formats.

ankith26 commented 2 years ago

I've not tested anything yet... but I can safely say both are fairly heavy, both in terms of the disk size and the work needed to set both up. The main problem is that both have many dependencies, which in turn may have more dependencies, and so on.

Another thing is that windows prebuilts don't even have these even in the "optional" section, and we don't have many convenient package managers to my knowledge which are updated frequently, provides a fix for the the issue that is blocking #3449 and also compile in these two. We might have to resort to compiling things ourselves on windows (which is also one way of unblocking the linked issue as you probably know)

Which is why I opened this issue for tracking these, its only worth adding if there's a decent sized demand for this.

Starbuck5 commented 1 year ago

Based on discussion and article here: https://www.reddit.com/r/programming/comments/yib184/google_chrome_is_already_preparing_to_deprecate/

Maybe avif is winning over JXL, so we should just add avif. If JXL gets more popular we can add it later.

avif is a spinoff of the AV1 video standard. Interestingly, libavif can use dav1d (av1 video decoder) as its decoding backend. So we could have an AV1 video based pygame.movie as well as avif pygame.image.load support very efficiently (from a file size standpoint).

abvgdeyoj commented 3 months ago

JXL is needed.