Update bundled libpng to version 1.6.43
[ChangeLog][Third-Party Code] libpng was updated to version 1.6.43 Pick-to: 6.6 6.5 6.2 5.15 Fixes: QTBUG-122989 Change-Id: Id439e64010bc3f6752f5589d663827a91f009173 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit 210f2004dffae149c857d8d79d51eb996643ad4a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
44ee8df9c7
commit
e1f069e65d
75
src/3rdparty/libpng/ANNOUNCE
vendored
75
src/3rdparty/libpng/ANNOUNCE
vendored
@ -1,5 +1,5 @@
|
||||
libpng 1.6.42 - January 29, 2024
|
||||
================================
|
||||
libpng 1.6.43 - February 23, 2024
|
||||
=================================
|
||||
|
||||
This is a public release of libpng, intended for use in production code.
|
||||
|
||||
@ -9,13 +9,13 @@ Files available for download
|
||||
|
||||
Source files with LF line endings (for Unix/Linux):
|
||||
|
||||
* libpng-1.6.42.tar.xz (LZMA-compressed, recommended)
|
||||
* libpng-1.6.42.tar.gz (deflate-compressed)
|
||||
* libpng-1.6.43.tar.xz (LZMA-compressed, recommended)
|
||||
* libpng-1.6.43.tar.gz (deflate-compressed)
|
||||
|
||||
Source files with CRLF line endings (for Windows):
|
||||
|
||||
* lpng1642.7z (LZMA-compressed, recommended)
|
||||
* lpng1642.zip (deflate-compressed)
|
||||
* lpng1643.7z (LZMA-compressed, recommended)
|
||||
* lpng1643.zip (deflate-compressed)
|
||||
|
||||
Other information:
|
||||
|
||||
@ -25,47 +25,36 @@ Other information:
|
||||
* TRADEMARK.md
|
||||
|
||||
|
||||
Changes from version 1.6.41 to version 1.6.42
|
||||
Changes from version 1.6.42 to version 1.6.43
|
||||
---------------------------------------------
|
||||
|
||||
* Fixed the implementation of the macro function `png_check_sig`.
|
||||
This was an API regression, introduced in libpng-1.6.41.
|
||||
(Reported by Matthieu Darbois)
|
||||
|
||||
|
||||
Changes from version 1.6.40 to version 1.6.41
|
||||
---------------------------------------------
|
||||
|
||||
* Added SIMD-optimized code for the Loongarch LSX hardware.
|
||||
(Contributed by GuXiWei, JinBo and ZhangLixia)
|
||||
* Fixed the run-time discovery of MIPS MSA hardware.
|
||||
(Contributed by Sui Jingfeng)
|
||||
* Fixed an off-by-one error in the function `png_do_check_palette_indexes`,
|
||||
which failed to recognize errors that might have existed in the first
|
||||
column of a broken palette-encoded image. This was a benign regression
|
||||
accidentally introduced in libpng-1.6.33. No pixel was harmed.
|
||||
(Contributed by Adam Richter; reviewed by John Bowler)
|
||||
* Fixed, improved and modernized the contrib/pngminus programs, i.e.,
|
||||
png2pnm.c and pnm2png.c
|
||||
* Removed old and peculiar portability hacks that were meant to silence
|
||||
warnings issued by gcc version 7.1 alone.
|
||||
* Fixed the row width check in png_check_IHDR().
|
||||
This corrected a bug that was specific to the 16-bit platforms,
|
||||
and removed a spurious compiler warning from the 64-bit builds.
|
||||
(Reported by Jacek Caban; fixed by John Bowler)
|
||||
* Added eXIf chunk support to the push-mode reader in pngpread.c.
|
||||
(Contributed by Chris Blume)
|
||||
* Added contrib/pngexif for the benefit of the users who would like
|
||||
to inspect the content of eXIf chunks.
|
||||
* Added contrib/conftest/basic.dfa, a basic build-time configuration.
|
||||
(Contributed by John Bowler)
|
||||
* Fixed and modernized the CMake file, and raised the minimum required
|
||||
CMake version from 3.1 to 3.6.
|
||||
(Contributed by Clinton Ingram, Timothy Lyanguzov, Tyler Kropp, et al.)
|
||||
* Allowed the configure script to disable the building of auxiliary tools
|
||||
and tests, thus catching up with the CMake file.
|
||||
(Contributed by Carlo Bramini)
|
||||
* Fixed a build issue on Mac.
|
||||
(Contributed by Zixu Wang)
|
||||
* Moved the Autoconf macro files to scripts/autoconf.
|
||||
* Moved the CMake files (except for the main CMakeLists.txt) to
|
||||
scripts/cmake and moved the list of their contributing authors to
|
||||
scripts/cmake/AUTHORS.md
|
||||
* Updated the CI configurations and scripts.
|
||||
* Relicensed the CI scripts to the MIT License.
|
||||
* Improved the test coverage.
|
||||
* Fixed a preprocessor condition in pngread.c that broke build-time
|
||||
configurations like contrib/conftest/pngcp.dfa.
|
||||
(Contributed by John Bowler)
|
||||
* Added CMake build support for LoongArch LSX.
|
||||
(Contributed by GuXiWei)
|
||||
* Fixed a CMake build error that occurred under a peculiar state of the
|
||||
dependency tree. This was a regression introduced in libpng-1.6.41.
|
||||
(Contributed by Dan Rosser)
|
||||
* Marked the installed libpng headers as system headers in CMake.
|
||||
(Contributed by Benjamin Buch)
|
||||
* Updated the build support for RISCOS.
|
||||
(Contributed by Cameron Cawley)
|
||||
* Updated the makefiles to allow cross-platform builds to initialize
|
||||
conventional make variables like AR and ARFLAGS.
|
||||
* Added various improvements to the CI scripts in areas like version
|
||||
consistency verification and text linting.
|
||||
* Added version consistency verification to pngtest.c also.
|
||||
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
|
||||
|
32
src/3rdparty/libpng/CHANGES
vendored
32
src/3rdparty/libpng/CHANGES
vendored
@ -6130,7 +6130,7 @@ Version 1.6.40 [June 21, 2023]
|
||||
Cleaned up the code, the build scripts, and the documentation.
|
||||
|
||||
Version 1.6.41 [January 24, 2024]
|
||||
Added SIMD-optimized code for the Loongarch LSX hardware.
|
||||
Added SIMD-optimized code for the LoongArch LSX hardware.
|
||||
(Contributed by GuXiWei, JinBo and ZhangLixia)
|
||||
Fixed the run-time discovery of MIPS MSA hardware.
|
||||
(Contributed by Sui Jingfeng)
|
||||
@ -6165,6 +6165,36 @@ Version 1.6.42 [January 29, 2024]
|
||||
Fixed the implementation of the macro function png_check_sig().
|
||||
This was an API regression, introduced in libpng-1.6.41.
|
||||
(Reported by Matthieu Darbois)
|
||||
Fixed and updated the libpng manual.
|
||||
|
||||
Version 1.6.43 [February 23, 2024]
|
||||
Fixed the row width check in png_check_IHDR().
|
||||
This corrected a bug that was specific to the 16-bit platforms,
|
||||
and removed a spurious compiler warning from the 64-bit builds.
|
||||
(Reported by Jacek Caban; fixed by John Bowler)
|
||||
Added eXIf chunk support to the push-mode reader in pngpread.c.
|
||||
(Contributed by Chris Blume)
|
||||
Added contrib/pngexif for the benefit of the users who would like
|
||||
to inspect the content of eXIf chunks.
|
||||
Added contrib/conftest/basic.dfa, a basic build-time configuration.
|
||||
(Contributed by John Bowler)
|
||||
Fixed a preprocessor condition in pngread.c that broke build-time
|
||||
configurations like contrib/conftest/pngcp.dfa.
|
||||
(Contributed by John Bowler)
|
||||
Added CMake build support for LoongArch LSX.
|
||||
(Contributed by GuXiWei)
|
||||
Fixed a CMake build error that occurred under a peculiar state of the
|
||||
dependency tree. This was a regression introduced in libpng-1.6.41.
|
||||
(Contributed by Dan Rosser)
|
||||
Marked the installed libpng headers as system headers in CMake.
|
||||
(Contributed by Benjamin Buch)
|
||||
Updated the build support for RISCOS.
|
||||
(Contributed by Cameron Cawley)
|
||||
Updated the makefiles to allow cross-platform builds to initialize
|
||||
conventional make variables like AR and ARFLAGS.
|
||||
Added various improvements to the CI scripts in areas like version
|
||||
consistency verification and text linting.
|
||||
Added version consistency verification to pngtest.c also.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net.
|
||||
Subscription is required; visit
|
||||
|
12
src/3rdparty/libpng/README
vendored
12
src/3rdparty/libpng/README
vendored
@ -1,4 +1,4 @@
|
||||
README for libpng version 1.6.42
|
||||
README for libpng version 1.6.43
|
||||
================================
|
||||
|
||||
See the note about version numbers near the top of `png.h`.
|
||||
@ -142,10 +142,11 @@ Files included in this distribution
|
||||
pngwrite.c => High-level write functions
|
||||
pngwtran.c => Write data transformations
|
||||
pngwutil.c => Write utility functions
|
||||
arm/ => Optimized code for the ARM platform
|
||||
intel/ => Optimized code for the INTEL-SSE2 platform
|
||||
mips/ => Optimized code for the MIPS platform
|
||||
powerpc/ => Optimized code for the PowerPC platform
|
||||
arm/ => Optimized code for ARM Neon
|
||||
intel/ => Optimized code for INTEL SSE2
|
||||
loongarch/ => Optimized code for LoongArch LSX
|
||||
mips/ => Optimized code for MIPS MSA and MIPS MMI
|
||||
powerpc/ => Optimized code for PowerPC VSX
|
||||
ci/ => Scripts for continuous integration
|
||||
contrib/ => External contributions
|
||||
arm-neon/ => Optimized code for the ARM-NEON platform
|
||||
@ -158,6 +159,7 @@ Files included in this distribution
|
||||
libtests/ => Test programs
|
||||
oss-fuzz/ => Files used by the OSS-Fuzz project for fuzz-testing
|
||||
libpng
|
||||
pngexif/ => Program to inspect the EXIF information in PNG files
|
||||
pngminim/ => Minimal decoder, encoder, and progressive decoder
|
||||
programs demonstrating the use of pngusr.dfa
|
||||
pngminus/ => Simple pnm2png and png2pnm programs
|
||||
|
4
src/3rdparty/libpng/libpng-manual.txt
vendored
4
src/3rdparty/libpng/libpng-manual.txt
vendored
@ -9,7 +9,7 @@ libpng-manual.txt - A description on how to use and modify libpng
|
||||
|
||||
Based on:
|
||||
|
||||
libpng version 1.6.36, December 2018, through 1.6.42 - January 2024
|
||||
libpng version 1.6.36, December 2018, through 1.6.43 - February 2024
|
||||
Updated and distributed by Cosmin Truta
|
||||
Copyright (c) 2018-2024 Cosmin Truta
|
||||
|
||||
@ -1178,7 +1178,7 @@ where row_pointers is an array of pointers to the pixel data for each row:
|
||||
If you know your image size and pixel size ahead of time, you can allocate
|
||||
row_pointers prior to calling png_read_png() with
|
||||
|
||||
if (height > PNG_UINT_32_MAX/(sizeof (png_byte)))
|
||||
if (height > PNG_UINT_32_MAX / (sizeof (png_bytep)))
|
||||
png_error(png_ptr,
|
||||
"Image is too tall to process in memory");
|
||||
|
||||
|
27
src/3rdparty/libpng/png.c
vendored
27
src/3rdparty/libpng/png.c
vendored
@ -14,7 +14,7 @@
|
||||
#include "pngpriv.h"
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef png_libpng_version_1_6_42 Your_png_h_is_not_version_1_6_42;
|
||||
typedef png_libpng_version_1_6_43 Your_png_h_is_not_version_1_6_43;
|
||||
|
||||
/* Tells libpng that we have already handled the first "num_bytes" bytes
|
||||
* of the PNG file signature. If the PNG data is embedded into another
|
||||
@ -794,7 +794,7 @@ png_get_copyright(png_const_structrp png_ptr)
|
||||
return PNG_STRING_COPYRIGHT
|
||||
#else
|
||||
return PNG_STRING_NEWLINE \
|
||||
"libpng version 1.6.42" PNG_STRING_NEWLINE \
|
||||
"libpng version 1.6.43" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 2018-2024 Cosmin Truta" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \
|
||||
PNG_STRING_NEWLINE \
|
||||
@ -2511,17 +2511,6 @@ png_colorspace_set_rgb_coefficients(png_structrp png_ptr)
|
||||
|
||||
#endif /* COLORSPACE */
|
||||
|
||||
#ifdef __GNUC__
|
||||
/* This exists solely to work round a warning from GNU C. */
|
||||
static int /* PRIVATE */
|
||||
png_gt(size_t a, size_t b)
|
||||
{
|
||||
return a > b;
|
||||
}
|
||||
#else
|
||||
# define png_gt(a,b) ((a) > (b))
|
||||
#endif
|
||||
|
||||
void /* PRIVATE */
|
||||
png_check_IHDR(png_const_structrp png_ptr,
|
||||
png_uint_32 width, png_uint_32 height, int bit_depth,
|
||||
@ -2543,8 +2532,16 @@ png_check_IHDR(png_const_structrp png_ptr,
|
||||
error = 1;
|
||||
}
|
||||
|
||||
if (png_gt(((width + 7) & (~7U)),
|
||||
((PNG_SIZE_MAX
|
||||
/* The bit mask on the first line below must be at least as big as a
|
||||
* png_uint_32. "~7U" is not adequate on 16-bit systems because it will
|
||||
* be an unsigned 16-bit value. Casting to (png_alloc_size_t) makes the
|
||||
* type of the result at least as bit (in bits) as the RHS of the > operator
|
||||
* which also avoids a common warning on 64-bit systems that the comparison
|
||||
* of (png_uint_32) against the constant value on the RHS will always be
|
||||
* false.
|
||||
*/
|
||||
if (((width + 7) & ~(png_alloc_size_t)7) >
|
||||
(((PNG_SIZE_MAX
|
||||
- 48 /* big_row_buf hack */
|
||||
- 1) /* filter byte */
|
||||
/ 8) /* 8-byte RGBA pixels */
|
||||
|
25
src/3rdparty/libpng/png.h
vendored
25
src/3rdparty/libpng/png.h
vendored
@ -1,7 +1,7 @@
|
||||
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
* libpng version 1.6.42
|
||||
* libpng version 1.6.43
|
||||
*
|
||||
* Copyright (c) 2018-2024 Cosmin Truta
|
||||
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
|
||||
@ -15,7 +15,7 @@
|
||||
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||
* libpng versions 0.97, January 1998, through 1.6.35, July 2018:
|
||||
* Glenn Randers-Pehrson
|
||||
* libpng versions 1.6.36, December 2018, through 1.6.42, January 2024:
|
||||
* libpng versions 1.6.36, December 2018, through 1.6.43, February 2024:
|
||||
* Cosmin Truta
|
||||
* See also "Contributing Authors", below.
|
||||
*/
|
||||
@ -239,7 +239,7 @@
|
||||
* ...
|
||||
* 1.5.30 15 10530 15.so.15.30[.0]
|
||||
* ...
|
||||
* 1.6.42 16 10641 16.so.16.41[.0]
|
||||
* 1.6.43 16 10643 16.so.16.43[.0]
|
||||
*
|
||||
* Henceforth the source version will match the shared-library major and
|
||||
* minor numbers; the shared-library major version number will be used for
|
||||
@ -255,9 +255,6 @@
|
||||
* to the info_ptr or png_ptr members through png.h, and the compiled
|
||||
* application is loaded with a different version of the library.
|
||||
*
|
||||
* DLLNUM will change each time there are forward or backward changes
|
||||
* in binary compatibility (e.g., when a new feature is added).
|
||||
*
|
||||
* See libpng.txt or libpng.3 for more information. The PNG specification
|
||||
* is available as a W3C Recommendation and as an ISO/IEC Standard; see
|
||||
* <https://www.w3.org/TR/2003/REC-PNG-20031110/>
|
||||
@ -278,19 +275,21 @@
|
||||
*/
|
||||
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.6.42"
|
||||
#define PNG_LIBPNG_VER_STRING "1.6.43"
|
||||
#define PNG_HEADER_VERSION_STRING " libpng version " PNG_LIBPNG_VER_STRING "\n"
|
||||
|
||||
#define PNG_LIBPNG_VER_SONUM 16
|
||||
#define PNG_LIBPNG_VER_DLLNUM 16
|
||||
/* The versions of shared library builds should stay in sync, going forward */
|
||||
#define PNG_LIBPNG_VER_SHAREDLIB 16
|
||||
#define PNG_LIBPNG_VER_SONUM PNG_LIBPNG_VER_SHAREDLIB /* [Deprecated] */
|
||||
#define PNG_LIBPNG_VER_DLLNUM PNG_LIBPNG_VER_SHAREDLIB /* [Deprecated] */
|
||||
|
||||
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
|
||||
#define PNG_LIBPNG_VER_MAJOR 1
|
||||
#define PNG_LIBPNG_VER_MINOR 6
|
||||
#define PNG_LIBPNG_VER_RELEASE 41
|
||||
#define PNG_LIBPNG_VER_RELEASE 43
|
||||
|
||||
/* This should be zero for a public release, or non-zero for a
|
||||
* development version. [Deprecated]
|
||||
* development version.
|
||||
*/
|
||||
#define PNG_LIBPNG_VER_BUILD 0
|
||||
|
||||
@ -318,7 +317,7 @@
|
||||
* From version 1.0.1 it is:
|
||||
* XXYYZZ, where XX=major, YY=minor, ZZ=release
|
||||
*/
|
||||
#define PNG_LIBPNG_VER 10641 /* 1.6.42 */
|
||||
#define PNG_LIBPNG_VER 10643 /* 1.6.43 */
|
||||
|
||||
/* Library configuration: these options cannot be changed after
|
||||
* the library has been built.
|
||||
@ -428,7 +427,7 @@ extern "C" {
|
||||
/* This triggers a compiler error in png.c, if png.c and png.h
|
||||
* do not agree upon the version number.
|
||||
*/
|
||||
typedef char* png_libpng_version_1_6_42;
|
||||
typedef char* png_libpng_version_1_6_43;
|
||||
|
||||
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
|
||||
*
|
||||
|
2
src/3rdparty/libpng/pngconf.h
vendored
2
src/3rdparty/libpng/pngconf.h
vendored
@ -1,7 +1,7 @@
|
||||
|
||||
/* pngconf.h - machine-configurable file for libpng
|
||||
*
|
||||
* libpng version 1.6.42
|
||||
* libpng version 1.6.43
|
||||
*
|
||||
* Copyright (c) 2018-2024 Cosmin Truta
|
||||
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
|
||||
|
2
src/3rdparty/libpng/pnglibconf.h
vendored
2
src/3rdparty/libpng/pnglibconf.h
vendored
@ -1,6 +1,6 @@
|
||||
/* pnglibconf.h - library build configuration */
|
||||
|
||||
/* libpng version 1.6.42 */
|
||||
/* libpng version 1.6.43 */
|
||||
|
||||
/* Copyright (c) 2018-2024 Cosmin Truta */
|
||||
/* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */
|
||||
|
8
src/3rdparty/libpng/pngpread.c
vendored
8
src/3rdparty/libpng/pngpread.c
vendored
@ -294,6 +294,14 @@ png_push_read_chunk(png_structrp png_ptr, png_inforp info_ptr)
|
||||
png_handle_cHRM(png_ptr, info_ptr, png_ptr->push_length);
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifdef PNG_READ_eXIf_SUPPORTED
|
||||
else if (png_ptr->chunk_name == png_eXIf)
|
||||
{
|
||||
PNG_PUSH_SAVE_BUFFER_IF_FULL
|
||||
png_handle_eXIf(png_ptr, info_ptr, png_ptr->push_length);
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifdef PNG_READ_sRGB_SUPPORTED
|
||||
else if (chunk_name == png_sRGB)
|
||||
|
6
src/3rdparty/libpng/pngread.c
vendored
6
src/3rdparty/libpng/pngread.c
vendored
@ -568,7 +568,11 @@ png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row)
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_TRANSFORMS_SUPPORTED
|
||||
if (png_ptr->transformations || png_ptr->num_palette_max >= 0)
|
||||
if (png_ptr->transformations
|
||||
# ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||
|| png_ptr->num_palette_max >= 0
|
||||
# endif
|
||||
)
|
||||
png_do_read_transformations(png_ptr, &row_info);
|
||||
#endif
|
||||
|
||||
|
26
src/3rdparty/libpng/pngrtran.c
vendored
26
src/3rdparty/libpng/pngrtran.c
vendored
@ -299,12 +299,11 @@ png_set_alpha_mode_fixed(png_structrp png_ptr, int mode,
|
||||
|
||||
/* Validate the value to ensure it is in a reasonable range. The value
|
||||
* is expected to be 1 or greater, but this range test allows for some
|
||||
* viewing correction values. The intent is to weed out users of this API
|
||||
* who use the inverse of the gamma value accidentally! Since some of these
|
||||
* values are reasonable this may have to be changed:
|
||||
* viewing correction values. The intent is to weed out the API users
|
||||
* who might use the inverse of the gamma value accidentally!
|
||||
*
|
||||
* 1.6.x: changed from 0.07..3 to 0.01..100 (to accommodate the optimal 16-bit
|
||||
* gamma of 36, and its reciprocal.)
|
||||
* In libpng 1.6.0, we changed from 0.07..3 to 0.01..100, to accommodate
|
||||
* the optimal 16-bit gamma of 36 and its reciprocal.
|
||||
*/
|
||||
if (output_gamma < 1000 || output_gamma > 10000000)
|
||||
png_error(png_ptr, "output gamma out of expected range");
|
||||
@ -441,7 +440,7 @@ png_set_quantize(png_structrp png_ptr, png_colorp palette,
|
||||
int i;
|
||||
|
||||
png_ptr->quantize_index = (png_bytep)png_malloc(png_ptr,
|
||||
(png_alloc_size_t)((png_uint_32)num_palette * (sizeof (png_byte))));
|
||||
(png_alloc_size_t)num_palette);
|
||||
for (i = 0; i < num_palette; i++)
|
||||
png_ptr->quantize_index[i] = (png_byte)i;
|
||||
}
|
||||
@ -458,7 +457,7 @@ png_set_quantize(png_structrp png_ptr, png_colorp palette,
|
||||
|
||||
/* Initialize an array to sort colors */
|
||||
png_ptr->quantize_sort = (png_bytep)png_malloc(png_ptr,
|
||||
(png_alloc_size_t)((png_uint_32)num_palette * (sizeof (png_byte))));
|
||||
(png_alloc_size_t)num_palette);
|
||||
|
||||
/* Initialize the quantize_sort array */
|
||||
for (i = 0; i < num_palette; i++)
|
||||
@ -592,11 +591,9 @@ png_set_quantize(png_structrp png_ptr, png_colorp palette,
|
||||
|
||||
/* Initialize palette index arrays */
|
||||
png_ptr->index_to_palette = (png_bytep)png_malloc(png_ptr,
|
||||
(png_alloc_size_t)((png_uint_32)num_palette *
|
||||
(sizeof (png_byte))));
|
||||
(png_alloc_size_t)num_palette);
|
||||
png_ptr->palette_to_index = (png_bytep)png_malloc(png_ptr,
|
||||
(png_alloc_size_t)((png_uint_32)num_palette *
|
||||
(sizeof (png_byte))));
|
||||
(png_alloc_size_t)num_palette);
|
||||
|
||||
/* Initialize the sort array */
|
||||
for (i = 0; i < num_palette; i++)
|
||||
@ -761,12 +758,11 @@ png_set_quantize(png_structrp png_ptr, png_colorp palette,
|
||||
size_t num_entries = ((size_t)1 << total_bits);
|
||||
|
||||
png_ptr->palette_lookup = (png_bytep)png_calloc(png_ptr,
|
||||
(png_alloc_size_t)(num_entries * (sizeof (png_byte))));
|
||||
(png_alloc_size_t)(num_entries));
|
||||
|
||||
distance = (png_bytep)png_malloc(png_ptr, (png_alloc_size_t)(num_entries *
|
||||
(sizeof (png_byte))));
|
||||
distance = (png_bytep)png_malloc(png_ptr, (png_alloc_size_t)num_entries);
|
||||
|
||||
memset(distance, 0xff, num_entries * (sizeof (png_byte)));
|
||||
memset(distance, 0xff, num_entries);
|
||||
|
||||
for (i = 0; i < num_palette; i++)
|
||||
{
|
||||
|
4
src/3rdparty/libpng/qt_attribution.json
vendored
4
src/3rdparty/libpng/qt_attribution.json
vendored
@ -7,8 +7,8 @@
|
||||
|
||||
"Description": "libpng is the official PNG reference library.",
|
||||
"Homepage": "http://www.libpng.org/pub/png/libpng.html",
|
||||
"Version": "1.6.42",
|
||||
"DownloadLocation": "https://download.sourceforge.net/libpng/libpng-1.6.42.tar.xz",
|
||||
"Version": "1.6.43",
|
||||
"DownloadLocation": "https://download.sourceforge.net/libpng/libpng-1.6.43.tar.xz",
|
||||
|
||||
"License": "libpng License and PNG Reference Library version 2",
|
||||
"LicenseId": "Libpng AND libpng-2.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user