Skip to content

Commit 2d5d14f

Browse files
committed
Document and test QOI support
1 parent 05487ea commit 2d5d14f

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

docs/reST/ref/image.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ formats.
3535

3636
* ``PNM``
3737

38+
* ``QOI``
39+
3840
* ``SVG`` (limited support, using Nano SVG)
3941

4042
* ``TGA`` (uncompressed)
@@ -48,6 +50,8 @@ formats.
4850

4951
.. versionaddedold:: 2.0 Loading SVG, WebP, PNM
5052

53+
.. versionadded:: 2.4.0 Loading QOI (Relies on SDL_Image 2.6.0+)
54+
5155
Saving images only supports a limited set of formats. You can save to the
5256
following formats.
5357

examples/data/purple.qoi

43 Bytes
Binary file not shown.

test/image_test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1763,6 +1763,9 @@ def test_load_extended(self):
17631763
("scarlet.webp", (252, 14, 53, 255)),
17641764
]
17651765

1766+
if pygame.image.get_sdl_image_version() > (2, 0, 5):
1767+
filename_expected_color.append(("purple.qoi", (159, 38, 240, 255)))
1768+
17661769
for filename, expected_color in filename_expected_color:
17671770
if filename.endswith("svg") and sdl_image_svg_jpeg_save_bug:
17681771
# SDL_image 2.0.5 and older has an svg loading bug on big

0 commit comments

Comments
 (0)