Skip to content

Commit c1ae93f

Browse files
committed
Update libpng to 1.6.58
1 parent ec4d352 commit c1ae93f

File tree

6 files changed

+20
-24
lines changed

6 files changed

+20
-24
lines changed

3rdparty/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199

200200
## png
201201
- [![Upstream](https://img.shields.io/github/v/tag/glennrp/libpng?label=Upstream)](https://github.com/glennrp/libpng)
202-
- Version: 1.6.57
202+
- Version: 1.6.58
203203
- License: PNG Reference Library License version 2
204204

205205
## poly2tri

3rdparty/png/png.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "pngpriv.h"
1414

1515
/* Generate a compiler error if there is an old png.h in the search path. */
16-
typedef png_libpng_version_1_6_57 Your_png_h_is_not_version_1_6_57;
16+
typedef png_libpng_version_1_6_58 Your_png_h_is_not_version_1_6_58;
1717

1818
/* Sanity check the chunks definitions - PNG_KNOWN_CHUNKS from pngpriv.h and the
1919
* corresponding macro definitions. This causes a compile time failure if
@@ -820,7 +820,7 @@ png_get_copyright(png_const_structrp png_ptr)
820820
return PNG_STRING_COPYRIGHT
821821
#else
822822
return PNG_STRING_NEWLINE \
823-
"libpng version 1.6.57" PNG_STRING_NEWLINE \
823+
"libpng version 1.6.58" PNG_STRING_NEWLINE \
824824
"Copyright (c) 2018-2026 Cosmin Truta" PNG_STRING_NEWLINE \
825825
"Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \
826826
PNG_STRING_NEWLINE \

3rdparty/png/png.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* png.h - header file for PNG reference library
22
*
3-
* libpng version 1.6.57
3+
* libpng version 1.6.58
44
*
55
* Copyright (c) 2018-2026 Cosmin Truta
66
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
@@ -14,7 +14,7 @@
1414
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
1515
* libpng versions 0.97, January 1998, through 1.6.35, July 2018:
1616
* Glenn Randers-Pehrson
17-
* libpng versions 1.6.36, December 2018, through 1.6.57, April 2026:
17+
* libpng versions 1.6.36, December 2018, through 1.6.58, April 2026:
1818
* Cosmin Truta
1919
* See also "Contributing Authors", below.
2020
*/
@@ -238,7 +238,7 @@
238238
* ...
239239
* 1.5.30 15 10530 15.so.15.30[.0]
240240
* ...
241-
* 1.6.57 16 10657 16.so.16.57[.0]
241+
* 1.6.58 16 10658 16.so.16.58[.0]
242242
*
243243
* Henceforth the source version will match the shared-library major and
244244
* minor numbers; the shared-library major version number will be used for
@@ -274,7 +274,7 @@
274274
*/
275275

276276
/* Version information for png.h - this should match the version in png.c */
277-
#define PNG_LIBPNG_VER_STRING "1.6.57"
277+
#define PNG_LIBPNG_VER_STRING "1.6.58"
278278
#define PNG_HEADER_VERSION_STRING " libpng version " PNG_LIBPNG_VER_STRING "\n"
279279

280280
/* The versions of shared library builds should stay in sync, going forward */
@@ -285,7 +285,7 @@
285285
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
286286
#define PNG_LIBPNG_VER_MAJOR 1
287287
#define PNG_LIBPNG_VER_MINOR 6
288-
#define PNG_LIBPNG_VER_RELEASE 57
288+
#define PNG_LIBPNG_VER_RELEASE 58
289289

290290
/* This should be zero for a public release, or non-zero for a
291291
* development version.
@@ -316,7 +316,7 @@
316316
* From version 1.0.1 it is:
317317
* XXYYZZ, where XX=major, YY=minor, ZZ=release
318318
*/
319-
#define PNG_LIBPNG_VER 10657 /* 1.6.57 */
319+
#define PNG_LIBPNG_VER 10658 /* 1.6.58 */
320320

321321
/* Library configuration: these options cannot be changed after
322322
* the library has been built.
@@ -426,7 +426,7 @@ extern "C" {
426426
/* This triggers a compiler error in png.c, if png.c and png.h
427427
* do not agree upon the version number.
428428
*/
429-
typedef char *png_libpng_version_1_6_57;
429+
typedef char *png_libpng_version_1_6_58;
430430

431431
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
432432
*

3rdparty/png/pngconf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* pngconf.h - machine-configurable file for libpng
22
*
3-
* libpng version 1.6.57
3+
* libpng version 1.6.58
44
*
55
* Copyright (c) 2018-2026 Cosmin Truta
66
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson

3rdparty/png/pnglibconf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* pnglibconf.h - library build configuration */
22

3-
/* libpng version 1.6.57 */
3+
/* libpng version 1.6.58 */
44

55
/* Copyright (c) 2018-2026 Cosmin Truta */
66
/* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */

3rdparty/png/pngrtran.c

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2070,19 +2070,15 @@ png_read_transform_info(png_structrp png_ptr, png_inforp info_ptr)
20702070
{
20712071
png_debug(1, "in png_read_transform_info");
20722072

2073-
if (png_ptr->transformations != 0)
2073+
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&
2074+
info_ptr->palette != NULL && png_ptr->palette != NULL)
20742075
{
2075-
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&
2076-
info_ptr->palette != NULL && png_ptr->palette != NULL)
2077-
{
2078-
/* Sync info_ptr->palette with png_ptr->palette.
2079-
* The function png_init_read_transformations may have modified
2080-
* png_ptr->palette in place (e.g. for gamma correction or for
2081-
* background compositing).
2082-
*/
2083-
memcpy(info_ptr->palette, png_ptr->palette,
2084-
PNG_MAX_PALETTE_LENGTH * (sizeof (png_color)));
2085-
}
2076+
/* Sync info_ptr->palette with png_ptr->palette, which may
2077+
* have been modified by png_init_read_transformations
2078+
* (e.g. for gamma correction or background compositing).
2079+
*/
2080+
memcpy(info_ptr->palette, png_ptr->palette,
2081+
PNG_MAX_PALETTE_LENGTH * (sizeof (png_color)));
20862082
}
20872083

20882084
#ifdef PNG_READ_EXPAND_SUPPORTED

0 commit comments

Comments
 (0)