Skip to content

Commit d60d888

Browse files
committed
Merge tag 'v1.6.46' into libpng18
Sync with libpng version 1.6.46
2 parents 1c56ac6 + 0024abd commit d60d888

34 files changed

+898
-100
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ indent_style = space
4141
max_doc_length = 100
4242
max_line_length = 100
4343

44-
[{Makefile.in,ltmain.sh}]
44+
[{Makefile.in,aclocal.m4,ltmain.sh}]
4545
indent_size = unset
4646
indent_style = unset
4747
insert_final_newline = unset

CHANGES

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6229,6 +6229,16 @@ Version 1.6.45 [January 7, 2025]
62296229
Raised the minimum required CMake version from 3.6 to 3.14.
62306230
Forked off a development branch for libpng version 1.8.
62316231

6232+
Version 1.6.46 [January 23, 2025]
6233+
Added support for the mDCV and cLLI chunks.
6234+
(Contributed by John Bowler)
6235+
Fixed a build issue affecting C89 compilers.
6236+
This was a regression introduced in libpng-1.6.45.
6237+
(Contributed by John Bowler)
6238+
Added makefile.c89, specifically for testing C89 compilers.
6239+
Cleaned up contrib/pngminus: corrected an old typo, removed an old
6240+
workaround, and updated the CMake file.
6241+
62326242
Version 1.8.0 [TODO]
62336243

62346244
Send comments/corrections/commendations to png-mng-implement at lists.sf.net.

Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Makefile.am, the source file for Makefile.in (and hence Makefile), is
22
#
3-
# Copyright (c) 2018-2024 Cosmin Truta
3+
# Copyright (c) 2018-2025 Cosmin Truta
44
# Copyright (c) 2004-2016 Glenn Randers-Pehrson
55
#
66
# This code is released under the libpng license.
@@ -159,7 +159,7 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \
159159
config.sub configure depcomp install-sh ltmain.sh missing
160160

161161
# PNG_COPTS give extra options for the C compiler to be used on all compilation
162-
# steps (unless targe_CFLAGS is specified; that will take precedence over
162+
# steps (unless target_CFLAGS is specified; that will take precedence over
163163
# AM_CFLAGS)
164164
PNG_COPTS = @PNG_COPTS@
165165
AM_CFLAGS = ${PNG_COPTS}

ci/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Scripts for the Continuous Integration of the PNG Reference Library
2+
===================================================================
3+
4+
Copyright Notice
5+
----------------
6+
7+
Copyright (c) 2019-2024 Cosmin Truta.
8+
9+
Use, modification and distribution are subject to the MIT License.
10+
Please see the accompanying file `LICENSE_MIT.txt` or visit
11+
https://opensource.org/license/mit
12+
13+
File List
14+
---------
15+
16+
LICENSE_MIT.txt ==> The License file
17+
README.md ==> This file
18+
ci_lint.sh ==> Lint the source code
19+
ci_shellify.sh ==> Convert select definitions to shell syntax
20+
ci_verify_cmake.sh ==> Verify the build driven by CMakeLists.txt
21+
ci_verify_configure.sh ==> Verify the build driven by configure
22+
ci_verify_makefiles.sh ==> Verify the build driven by scripts/makefile.*
23+
ci_verify_version.sh ==> Verify the consistency of version definitions
24+
lib/ci.lib.sh ==> Shell utilities for the main ci_*.sh scripts
25+
targets/*/ci_env.*.sh ==> Shell environments for cross-platform testing

contrib/libtests/pngunknown.c

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ typedef png_byte *png_const_bytep;
112112
#define png_PLTE PNG_U32( 80, 76, 84, 69)
113113
#define png_bKGD PNG_U32( 98, 75, 71, 68)
114114
#define png_cHRM PNG_U32( 99, 72, 82, 77)
115+
#define png_cICP PNG_U32( 99, 73, 67, 80) /* PNGv3 */
116+
#define png_cLLI PNG_U32( 99, 76, 76, 73) /* PNGv3 */
115117
#define png_eXIf PNG_U32(101, 88, 73, 102) /* registered July 2017 */
116118
#define png_fRAc PNG_U32(102, 82, 65, 99) /* registered, not defined */
117119
#define png_gAMA PNG_U32(103, 65, 77, 65)
@@ -121,6 +123,7 @@ typedef png_byte *png_const_bytep;
121123
#define png_hIST PNG_U32(104, 73, 83, 84)
122124
#define png_iCCP PNG_U32(105, 67, 67, 80)
123125
#define png_iTXt PNG_U32(105, 84, 88, 116)
126+
#define png_mDCV PNG_U32(109, 68, 67, 86) /* PNGv3 */
124127
#define png_oFFs PNG_U32(111, 70, 70, 115)
125128
#define png_pCAL PNG_U32(112, 67, 65, 76)
126129
#define png_pHYs PNG_U32(112, 72, 89, 115)
@@ -205,6 +208,20 @@ static struct
205208
0,
206209
# else
207210
1,
211+
# endif
212+
1, START, 0 },
213+
{ "cICP", PNG_INFO_cICP, png_cICP,
214+
# ifdef PNG_READ_cICP_SUPPORTED
215+
0,
216+
# else
217+
1,
218+
# endif
219+
1, START, 0 },
220+
{ "cLLI", PNG_INFO_cLLI, png_cLLI,
221+
# ifdef PNG_READ_cLLI_SUPPORTED
222+
0,
223+
# else
224+
1,
208225
# endif
209226
1, START, 0 },
210227
{ "eXIf", PNG_INFO_eXIf, png_eXIf,
@@ -242,6 +259,13 @@ static struct
242259
1,
243260
# endif
244261
1, ABSENT, 0 },
262+
{ "mDCV", PNG_INFO_mDCV, png_mDCV,
263+
# ifdef PNG_READ_mDCV_SUPPORTED
264+
0,
265+
# else
266+
1,
267+
# endif
268+
1, START, 0 },
245269
{ "oFFs", PNG_INFO_oFFs, png_oFFs,
246270
# ifdef PNG_READ_oFFs_SUPPORTED
247271
0,

contrib/pngminus/.editorconfig

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# https://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = unset
8+
indent_size = unset
9+
indent_style = space
10+
insert_final_newline = true
11+
max_doc_length = 79
12+
max_line_length = 79
13+
trim_trailing_whitespace = true
14+
15+
[*.[ch]]
16+
indent_size = 2
17+
indent_style = space
18+
19+
[CMakeLists.txt]
20+
indent_size = 4
21+
indent_style = space
22+
max_doc_length = 79
23+
max_line_length = 99
24+
25+
[{Makefile,makevms.com}]
26+
indent_size = unset
27+
indent_style = unset
28+
max_doc_length = 79
29+
max_line_length = 99

contrib/pngminus/CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ version 1.0 - 1999.10.15 - First version.
1111
1.6 - 2018.08.05 - Improve portability and fix style (Cosmin Truta)
1212
1.7 - 2019.01.22 - Change license to MIT (Willem van Schaik)
1313
1.8 - 2024.01.09 - Fix, improve, modernize (Cosmin Truta)
14+
1.9 - 2025.01.10 - Delete conditionally-compiled code (Cosmin Truta)

contrib/pngminus/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Copyright (c) 2018-2024 Cosmin Truta
1+
# Copyright (c) 2018-2025 Cosmin Truta
22
#
33
# This software is released under the MIT license. For conditions of
44
# distribution and use, see the LICENSE file part of this package.
55

6-
cmake_minimum_required(VERSION 3.5)
6+
cmake_minimum_required(VERSION 3.14)
77

88
project(PNGMINUS C)
99

contrib/pngminus/png2pnm.c

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ int main (int argc, char *argv[])
6666
if ((fp_al = fopen (argv[argi], "wb")) == NULL)
6767
{
6868
fname_al = argv[argi];
69-
fprintf (stderr, "PNM2PNG\n");
69+
fprintf (stderr, "PNG2PNM\n");
7070
fprintf (stderr, "Error: cannot create alpha-channel file %s\n",
7171
argv[argi]);
7272
exit (1);
@@ -235,22 +235,6 @@ BOOL do_png2pnm (png_struct *png_ptr, png_info *info_ptr,
235235
/* set up (if applicable) the expansion of grayscale images to bit-depth 8 */
236236
png_set_expand_gray_1_2_4_to_8 (png_ptr);
237237

238-
#ifdef NJET
239-
/* downgrade 16-bit images to 8-bit */
240-
if (bit_depth == 16)
241-
png_set_strip_16 (png_ptr);
242-
/* transform grayscale images into full-color */
243-
if (color_type == PNG_COLOR_TYPE_GRAY ||
244-
color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
245-
png_set_gray_to_rgb (png_ptr);
246-
/* if the PNG image has a gAMA chunk then gamma-correct the output image */
247-
{
248-
double file_gamma;
249-
if (png_get_gAMA (png_ptr, info_ptr, &file_gamma))
250-
png_set_gamma (png_ptr, (double) 2.2, file_gamma);
251-
}
252-
#endif
253-
254238
/* read the image file, with all of the above image transforms applied */
255239
png_read_png (png_ptr, info_ptr, 0, NULL);
256240

manuals/libpng-manual.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ libpng-manual.txt - A description on how to use and modify libpng
99

1010
Based on:
1111

12-
libpng version 1.6.36, December 2018, through 1.6.45 - January 2025
12+
libpng version 1.6.36, December 2018, through 1.6.46 - January 2025
1313
Updated and distributed by Cosmin Truta
1414
Copyright (c) 2018-2025 Cosmin Truta
1515

0 commit comments

Comments
 (0)