mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1a6f2c3de | ||
|
|
40445d992b | ||
|
|
e7b15476b8 | ||
|
|
ec71f9c6d8 | ||
|
|
a138188d57 |
No files matched your search
@@ -1,6 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
|
||||||
|
## 2024-04-19 version 0.3.4
|
||||||
|
|
||||||
|
- Have `std/png` ignore tRNS chunks for color types 4 (YA) and 6 (RGBA).
|
||||||
|
|
||||||
|
|
||||||
## 2023-04-08 version 0.3.3
|
## 2023-04-08 version 0.3.3
|
||||||
|
|
||||||
The `wuffs_base__parse_number_f64` function has been further optimized.
|
The `wuffs_base__parse_number_f64` function has been further optimized.
|
||||||
|
|||||||
@@ -41568,20 +41568,22 @@ wuffs_png__decoder__decode_other_chunk(
|
|||||||
self->private_impl.f_seen_srgb = true;
|
self->private_impl.f_seen_srgb = true;
|
||||||
}
|
}
|
||||||
} else if (self->private_impl.f_chunk_type == 1397641844) {
|
} else if (self->private_impl.f_chunk_type == 1397641844) {
|
||||||
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)) {
|
if (self->private_impl.f_seen_trns || ((self->private_impl.f_color_type == 3) && ! self->private_impl.f_seen_plte)) {
|
||||||
status = wuffs_base__make_status(wuffs_png__error__bad_chunk);
|
status = wuffs_base__make_status(wuffs_png__error__bad_chunk);
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
} else if (self->private_impl.f_color_type > 3) {
|
||||||
if (a_src) {
|
} else {
|
||||||
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
|
if (a_src) {
|
||||||
}
|
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
|
||||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(9);
|
}
|
||||||
status = wuffs_png__decoder__decode_trns(self, a_src);
|
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(9);
|
||||||
if (a_src) {
|
status = wuffs_png__decoder__decode_trns(self, a_src);
|
||||||
iop_a_src = a_src->data.ptr + a_src->meta.ri;
|
if (a_src) {
|
||||||
}
|
iop_a_src = a_src->data.ptr + a_src->meta.ri;
|
||||||
if (status.repr) {
|
}
|
||||||
goto suspend;
|
if (status.repr) {
|
||||||
|
goto suspend;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
self->private_impl.f_seen_trns = true;
|
self->private_impl.f_seen_trns = true;
|
||||||
}
|
}
|
||||||
|
|||||||
+20
-18
@@ -85,15 +85,15 @@ extern "C" {
|
|||||||
// each major.minor branch, the commit count should increase monotonically.
|
// each major.minor branch, the commit count should increase monotonically.
|
||||||
//
|
//
|
||||||
// WUFFS_VERSION was overridden by "wuffs gen -version" based on revision
|
// WUFFS_VERSION was overridden by "wuffs gen -version" based on revision
|
||||||
// 00d5e35865a2f2718f4bb2596adaaa54bd639bbe committed on 2023-04-08.
|
// 40445d992b97be816cd09b0460c55e6a160389f6 committed on 2026-07-11.
|
||||||
#define WUFFS_VERSION 0x000030003
|
#define WUFFS_VERSION 0x000030005
|
||||||
#define WUFFS_VERSION_MAJOR 0
|
#define WUFFS_VERSION_MAJOR 0
|
||||||
#define WUFFS_VERSION_MINOR 3
|
#define WUFFS_VERSION_MINOR 3
|
||||||
#define WUFFS_VERSION_PATCH 3
|
#define WUFFS_VERSION_PATCH 5
|
||||||
#define WUFFS_VERSION_PRE_RELEASE_LABEL ""
|
#define WUFFS_VERSION_PRE_RELEASE_LABEL ""
|
||||||
#define WUFFS_VERSION_BUILD_METADATA_COMMIT_COUNT 3399
|
#define WUFFS_VERSION_BUILD_METADATA_COMMIT_COUNT 3404
|
||||||
#define WUFFS_VERSION_BUILD_METADATA_COMMIT_DATE 20230408
|
#define WUFFS_VERSION_BUILD_METADATA_COMMIT_DATE 20260711
|
||||||
#define WUFFS_VERSION_STRING "0.3.3+3399.20230408"
|
#define WUFFS_VERSION_STRING "0.3.5+3404.20260711"
|
||||||
|
|
||||||
// ---------------- Configuration
|
// ---------------- Configuration
|
||||||
|
|
||||||
@@ -41569,20 +41569,22 @@ wuffs_png__decoder__decode_other_chunk(
|
|||||||
self->private_impl.f_seen_srgb = true;
|
self->private_impl.f_seen_srgb = true;
|
||||||
}
|
}
|
||||||
} else if (self->private_impl.f_chunk_type == 1397641844) {
|
} else if (self->private_impl.f_chunk_type == 1397641844) {
|
||||||
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)) {
|
if (self->private_impl.f_seen_trns || ((self->private_impl.f_color_type == 3) && ! self->private_impl.f_seen_plte)) {
|
||||||
status = wuffs_base__make_status(wuffs_png__error__bad_chunk);
|
status = wuffs_base__make_status(wuffs_png__error__bad_chunk);
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
} else if (self->private_impl.f_color_type > 3) {
|
||||||
if (a_src) {
|
} else {
|
||||||
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
|
if (a_src) {
|
||||||
}
|
a_src->meta.ri = ((size_t)(iop_a_src - a_src->data.ptr));
|
||||||
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(9);
|
}
|
||||||
status = wuffs_png__decoder__decode_trns(self, a_src);
|
WUFFS_BASE__COROUTINE_SUSPENSION_POINT(9);
|
||||||
if (a_src) {
|
status = wuffs_png__decoder__decode_trns(self, a_src);
|
||||||
iop_a_src = a_src->data.ptr + a_src->meta.ri;
|
if (a_src) {
|
||||||
}
|
iop_a_src = a_src->data.ptr + a_src->meta.ri;
|
||||||
if (status.repr) {
|
}
|
||||||
goto suspend;
|
if (status.repr) {
|
||||||
|
goto suspend;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
self->private_impl.f_seen_trns = true;
|
self->private_impl.f_seen_trns = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -615,11 +615,20 @@ pri func decoder.decode_other_chunk?(src: base.io_reader, framy: base.bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else if this.chunk_type == 'tRNS'le {
|
} else if this.chunk_type == 'tRNS'le {
|
||||||
if this.seen_trns or (this.color_type > 3) or
|
if this.seen_trns or
|
||||||
((this.color_type == 3) and (not this.seen_plte)) {
|
((this.color_type == 3) and (not this.seen_plte)) {
|
||||||
return "#bad chunk"
|
return "#bad chunk"
|
||||||
|
} else if this.color_type > 3 {
|
||||||
|
// No-op, ignoring the chunk. The PNG spec section "11.3.2.1
|
||||||
|
// tRNS Transparency" says that "A tRNS chunk shall not appear
|
||||||
|
// for colour types 4 and 6, since a full alpha channel is
|
||||||
|
// already present in those cases." However, some real-world
|
||||||
|
// PNG images (incorrectly) have these. libpng treats this as a
|
||||||
|
// "benign error", not a fatal one. See
|
||||||
|
// https://github.com/google/wuffs/issues/146
|
||||||
|
} else {
|
||||||
|
this.decode_trns?(src: args.src)
|
||||||
}
|
}
|
||||||
this.decode_trns?(src: args.src)
|
|
||||||
this.seen_trns = true
|
this.seen_trns = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,9 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
|
#include <limits.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "bzlib.h"
|
#include "bzlib.h"
|
||||||
|
|
||||||
const char* //
|
const char* //
|
||||||
|
|||||||
@@ -23,6 +23,9 @@
|
|||||||
// #define WUFFS_MIMICLIB_USE_LIBDEFLATE_INSTEAD_OF_ZLIB 1
|
// #define WUFFS_MIMICLIB_USE_LIBDEFLATE_INSTEAD_OF_ZLIB 1
|
||||||
// #define WUFFS_MIMICLIB_USE_MINIZ_INSTEAD_OF_ZLIB 1
|
// #define WUFFS_MIMICLIB_USE_MINIZ_INSTEAD_OF_ZLIB 1
|
||||||
|
|
||||||
|
#include <limits.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
// -------------------------------- WUFFS_MIMICLIB_USE_XXX_INSTEAD_OF_ZLIB
|
// -------------------------------- WUFFS_MIMICLIB_USE_XXX_INSTEAD_OF_ZLIB
|
||||||
#if defined(WUFFS_MIMICLIB_USE_LIBDEFLATE_INSTEAD_OF_ZLIB)
|
#if defined(WUFFS_MIMICLIB_USE_LIBDEFLATE_INSTEAD_OF_ZLIB)
|
||||||
#include "libdeflate.h"
|
#include "libdeflate.h"
|
||||||
|
|||||||
@@ -12,6 +12,9 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
|
#include <limits.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "gif_lib.h"
|
#include "gif_lib.h"
|
||||||
|
|
||||||
int //
|
int //
|
||||||
|
|||||||
@@ -24,6 +24,9 @@
|
|||||||
// #define WUFFS_MIMICLIB_USE_LODEPNG_INSTEAD_OF_LIBPNG 1
|
// #define WUFFS_MIMICLIB_USE_LODEPNG_INSTEAD_OF_LIBPNG 1
|
||||||
// #define WUFFS_MIMICLIB_USE_STB_IMAGE_INSTEAD_OF_LIBPNG 1
|
// #define WUFFS_MIMICLIB_USE_STB_IMAGE_INSTEAD_OF_LIBPNG 1
|
||||||
|
|
||||||
|
#include <limits.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
// -------------------------------- WUFFS_MIMICLIB_USE_XXX_INSTEAD_OF_LIBPNG
|
// -------------------------------- WUFFS_MIMICLIB_USE_XXX_INSTEAD_OF_LIBPNG
|
||||||
#if defined(WUFFS_MIMICLIB_USE_LIBSPNG_INSTEAD_OF_LIBPNG)
|
#if defined(WUFFS_MIMICLIB_USE_LIBSPNG_INSTEAD_OF_LIBPNG)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
𝔸 U+1D538 MATHEMATICAL DOUBLE-STRUCK CAPITAL A. UTF-8: [F0 9D 94 B8].
|
||||||
|
|
||||||
|
This code point is outside of the Unicode BMP (Basic Multilingual Plane), but
|
||||||
|
its Unicode Category is Lu (Letter, uppercase), so it is still a valid file
|
||||||
|
path in terms of pkg.go.dev and its golang.org/x/mod/module package:
|
||||||
|
|
||||||
|
https://github.com/golang/mod/blob/dc121ce20ffab6bb810a0f231cfa9c24d3e51b29/module/module.go#L293
|
||||||
File renamed without changes.
@@ -1,3 +0,0 @@
|
|||||||
😻 U+1F63B SMILING CAT FACE WITH HEART-SHAPED EYES. UTF-8: [F0 9F 98 BB].
|
|
||||||
|
|
||||||
This code point is outside of the Unicode BMP (Basic Multilingual Plane).
|
|
||||||
Reference in new issue
Block a user