@@ -47,8 +47,8 @@ def get_dll_file():
4747# Constants, enums, type definitions, and macros
4848
4949SDL_IMAGE_MAJOR_VERSION = 2
50- SDL_IMAGE_MINOR_VERSION = 6
51- SDL_IMAGE_PATCHLEVEL = 0
50+ SDL_IMAGE_MINOR_VERSION = 8
51+ SDL_IMAGE_PATCHLEVEL = 1
5252
5353def SDL_IMAGE_VERSION (x ):
5454 x .major = SDL_IMAGE_MAJOR_VERSION
@@ -173,6 +173,7 @@ class IMG_Animation(Structure):
173173 SDLFunc ("IMG_LoadAnimationTyped_RW" , [_P (SDL_RWops ), c_int , c_char_p ], _P (IMG_Animation ), added = '2.6.0' ),
174174 SDLFunc ("IMG_FreeAnimation" , [_P (IMG_Animation )], added = '2.6.0' ),
175175 SDLFunc ("IMG_LoadGIFAnimation_RW" , [_P (SDL_RWops )], _P (IMG_Animation ), added = '2.6.0' ),
176+ SDLFunc ("IMG_LoadWEBPAnimation_RW" , [_P (SDL_RWops )], _P (IMG_Animation ), added = '2.8.0' ),
176177]
177178_ctypes = AttributeDict ()
178179for f in _funcdefs :
@@ -1114,8 +1115,8 @@ def IMG_LoadAnimation(file):
11141115 """Loads an animated image from a file.
11151116
11161117 For more information on how to work with imported animations, see the
1117- :class:`IMG_Animation` documentation. As of SDL_image 2.6 .0, this currently
1118- only supports GIF animations.
1118+ :class:`IMG_Animation` documentation. As of SDL_image 2.8 .0, this currently
1119+ supports GIF and WEBP animations.
11191120
11201121 `Note: Added in SDL_image 2.6.0`
11211122
@@ -1134,8 +1135,8 @@ def IMG_LoadAnimation_RW(src, freesrc):
11341135 """Loads an animated image from an SDL file object.
11351136
11361137 For more information on how to work with imported animations, see the
1137- :class:`IMG_Animation` documentation. As of SDL_image 2.6 .0, this currently
1138- only supports GIF animations.
1138+ :class:`IMG_Animation` documentation. As of SDL_image 2.8 .0, this currently
1139+ supports GIF and WEBP animations.
11391140
11401141 `Note: Added in SDL_image 2.6.0`
11411142
@@ -1156,8 +1157,8 @@ def IMG_LoadAnimationTyped_RW(src, freesrc, type):
11561157 """Loads an animated image from an SDL file object as a specific format.
11571158
11581159 For more information on how to work with imported animations, see the
1159- :class:`IMG_Animation` documentation. As of SDL_image 2.6 .0, the only
1160- supported animation type is ``b'GIF'``.
1160+ :class:`IMG_Animation` documentation. As of SDL_image 2.8 .0, the only
1161+ supported animation types are ``b'GIF'`` and ``b'WEBP '``.
11611162
11621163 `Note: Added in SDL_image 2.6.0`
11631164
@@ -1210,6 +1211,25 @@ def IMG_LoadGIFAnimation_RW(src):
12101211 """
12111212 return _ctypes ["IMG_LoadGIFAnimation_RW" ](src )
12121213
1214+ def IMG_LoadWEBPAnimation_RW (src ):
1215+ """Loads a WEBP animation from an SDL file object.
1216+
1217+ For more information on how to work with imported animations, see the
1218+ :class:`IMG_Animation` documentation. Use the :func:`IMG_GetError`
1219+ function to check for any errors.
1220+
1221+ `Note: Added in SDL_image 2.8.0`
1222+
1223+ Args:
1224+ src (:obj:`SDL_RWops`): The file object from which to load the WEBP.
1225+
1226+ Returns:
1227+ POINTER(:obj:`IMG_Animation`): A pointer to an animation object, or a
1228+ a null pointer if there was an error.
1229+
1230+ """
1231+ return _ctypes ["IMG_LoadWEBPAnimation_RW" ](src )
1232+
12131233
12141234IMG_SetError = SDL_SetError
12151235IMG_GetError = SDL_GetError
0 commit comments