Skip to content

Commit 56395a6

Browse files
committed
Update to Wuffs 0.3.4
1 parent 87d31ba commit 56395a6

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

Docs/ChangeLog-4x.md

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ The 4.8.0 release is a minor maintenance release.
1818
run outside of Rosetta on an Apple silicon device.
1919
* **Feature:** Builds using Clang can now build with undefined behavior
2020
sanitizer by setting `-DASTCENC_UBSAN=ON` on the CMake configure line.
21+
* **Feature:** Updated to Wuffs library 0.3.4, which ignores tRNS alpha chunks
22+
for type 4 (LA) and 6 (RGBA) PNGs, to improve compatability with libpng.
2123

2224
<!-- ---------------------------------------------------------------------- -->
2325
## 4.7.0

Source/wuffs-v0.3.c

+20-18
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@ extern "C" {
8585
// each major.minor branch, the commit count should increase monotonically.
8686
//
8787
// WUFFS_VERSION was overridden by "wuffs gen -version" based on revision
88-
// 00d5e35865a2f2718f4bb2596adaaa54bd639bbe committed on 2023-04-08.
89-
#define WUFFS_VERSION 0x000030003
88+
// a138188d5742c0469de983878a430bdbe7e50e77 committed on 2024-04-19.
89+
#define WUFFS_VERSION 0x000030004
9090
#define WUFFS_VERSION_MAJOR 0
9191
#define WUFFS_VERSION_MINOR 3
92-
#define WUFFS_VERSION_PATCH 3
92+
#define WUFFS_VERSION_PATCH 4
9393
#define WUFFS_VERSION_PRE_RELEASE_LABEL ""
94-
#define WUFFS_VERSION_BUILD_METADATA_COMMIT_COUNT 3399
95-
#define WUFFS_VERSION_BUILD_METADATA_COMMIT_DATE 20230408
96-
#define WUFFS_VERSION_STRING "0.3.3+3399.20230408"
94+
#define WUFFS_VERSION_BUILD_METADATA_COMMIT_COUNT 3401
95+
#define WUFFS_VERSION_BUILD_METADATA_COMMIT_DATE 20240419
96+
#define WUFFS_VERSION_STRING "0.3.4+3401.20240419"
9797

9898
// ---------------- Configuration
9999

@@ -41569,20 +41569,22 @@ wuffs_png__decoder__decode_other_chunk(
4156941569
self->private_impl.f_seen_srgb = true;
4157041570
}
4157141571
} else if (self->private_impl.f_chunk_type == 1397641844) {
41572-
if (self->private_impl.f_seen_trns || (self->private_impl.f_color_type > 3) || ((self->private_impl.f_color_type == 3) && ! self->private_impl.f_seen_plte)) {
41572+
if (self->private_impl.f_seen_trns || ((self->private_impl.f_color_type == 3) && ! self->private_impl.f_seen_plte)) {
4157341573
status = wuffs_base__make_status(wuffs_png__error__bad_chunk);
4157441574
goto exit;
41575-
}
41576-
if (a_src) {
41577-
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
41578-
}
41579-
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(9);
41580-
status = wuffs_png__decoder__decode_trns(self, a_src);
41581-
if (a_src) {
41582-
iop_a_src = a_src->data.ptr + a_src->meta.ri;
41583-
}
41584-
if (status.repr) {
41585-
goto suspend;
41575+
} else if (self->private_impl.f_color_type > 3) {
41576+
} else {
41577+
if (a_src) {
41578+
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
41579+
}
41580+
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(9);
41581+
status = wuffs_png__decoder__decode_trns(self, a_src);
41582+
if (a_src) {
41583+
iop_a_src = a_src->data.ptr + a_src->meta.ri;
41584+
}
41585+
if (status.repr) {
41586+
goto suspend;
41587+
}
4158641588
}
4158741589
self->private_impl.f_seen_trns = true;
4158841590
}

0 commit comments

Comments
 (0)