Skip to content

Commit 7b90102

Browse files
committed
Minor fixes
1 parent 7fe3c49 commit 7b90102

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/wuffs-bindings.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ py::enum_<wuffs_aux_wrap::PixelFormat>(
365365
py::class_<wuffs_aux_wrap::ImageDecoder>(aux_m, "ImageDecoder",
366366
"Image decoder class.")
367367
.def(py::init<const wuffs_aux_wrap::ImageDecoderConfig&>(),
368-
"Sole constructor.\n\n"
368+
"Sole constructor. Please note that the class is not thread-safe.\n\n"
369369
"Args:"
370370
"\n config (ImageDecoderConfig): image decoder config.")
371371
.def(

test/test_aux_image_decoder.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
(ImageDecoderType.ETC2, os.path.join(IMAGES_PATH, "bricks-color.etc2.pkm")),
2121
(ImageDecoderType.TH, os.path.join(IMAGES_PATH, "1QcSHQRnh493V4dIh4eXh1h4kJUI.th"))
2222
]
23+
EXIF_FOURCC = 0x45584946
2324

2425

2526
# Positive test cases
@@ -181,7 +182,7 @@ def test_decode_image_exif_metadata():
181182
assert decoding_result.pixbuf.shape == (32, 32, 4)
182183
meta_minfo = decoding_result.reported_metadata[0].minfo
183184
meta_bytes = decoding_result.reported_metadata[0].data.tobytes()
184-
assert meta_minfo.metadata__fourcc() == 1163413830 # EXIF
185+
assert meta_minfo.metadata__fourcc() == EXIF_FOURCC
185186
assert meta_bytes[:2] == b"II" # little endian
186187
exif_orientation = 0
187188
cursor = 0
@@ -332,5 +333,5 @@ def decode(image):
332333
assert_decoded(result, 1)
333334
meta_minfo = result.reported_metadata[0].minfo
334335
meta_bytes = result.reported_metadata[0].data.tobytes()
335-
assert meta_minfo.metadata__fourcc() == 1163413830
336+
assert meta_minfo.metadata__fourcc() == EXIF_FOURCC
336337
assert meta_bytes[:2] == b"II"

0 commit comments

Comments
 (0)