1
0
mirror of https://github.com/glennrp/libpng.git synced 2026-10-22 20:29:09 +03:00

1414 Commits

Author SHA1 Message Date
Cosmin Truta
1f1a501346 maint: Bump version to 1.6.60.git 2026-09-30 11:59:55 +03:00
Cosmin Truta
cd952f49f9 Release libpng version 1.6.59 2026-09-28 23:58:10 +03:00
Cosmin Truta
65152c0657 maint: Rerun ./autogen.sh --maintainer 2026-09-28 23:39:32 +03:00
yaito3014
fad0b25433 fix(build): Use space-separated string for CMAKE_REQUIRED_FLAGS
This is a cherry-pick of commit d733c11206
from branch 'libpng18'.

Co-authored-by: Brad King <brad.king@kitware.com>
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
2026-06-19 23:54:59 +03:00
Carlo Bramini
78ae423bf0 build: Fix wrong symlink created for import library on MinGW and Cygwin
This is a cherry-pick of commit 0bb2bb50e3
from branch 'libpng18'

Resolves: https://github.com/pnggroup/libpng/issues/783
Reviewed-by: Cosmin Truta <ctruta@gmail.com>
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
2026-06-19 11:54:25 +03:00
Cosmin Truta
8c62c3b86a Bump version to 1.6.59.git 2026-04-22 21:32:07 +03:00
Cosmin Truta
3061454d98 Release libpng version 1.6.58 2026-04-15 20:23:26 +03:00
Cosmin Truta
ac07fb0819 Bump version to 1.6.58.git 2026-04-15 11:46:46 +03:00
Cosmin Truta
95ab3fdca8 Release libpng version 1.6.57 2026-04-08 23:49:24 +03:00
Cosmin Truta
2182a677dd Bump version to 1.6.57.git 2026-03-27 20:25:50 +02:00
Cosmin Truta
d5515b5b8b Release libpng version 1.6.56 2026-03-25 22:47:06 +02:00
Cosmin Truta
838b2e89ad build: Deprecate the POINTER_INDEXING config option
POINTER_INDEXING was a build configuration option that we maintained
in order to work around a gcc 2.7.2.2 code generation bug (circa 1997).
This provided array-indexing fallback loops in `png_write_PLTE` and
`png_write_sPLT`.

Unfortunately, the fallback paths were effectively untested dead code
in every default build, and have been a recurring source of latent bugs.
(See commit 48800443eb in pnggroup/libpng#801 and commit f27592a0cd in
libpng 1.5.2rc02).

No compiler in current use requires this accommodation.

This is a cherry-pick of commit 28cb99fe65
from branch 'libpng18'.
2026-03-06 18:20:52 +02:00
Cosmin Truta
61b3a6fc08 Bump version to 1.6.56.git 2026-02-11 19:40:22 +02:00
Cosmin Truta
c3e304954a Release libpng version 1.6.55 2026-02-09 22:02:20 +02:00
Cosmin Truta
9404d8e35b chore: Pacify markdownlint 2026-02-09 17:51:02 +02:00
Cosmin Truta
b884e8c618 Bump version to 1.6.55.git 2026-02-06 19:03:06 +02:00
Cosmin Truta
02f2b4f469 Release libpng 1.6.54 2026-01-12 23:57:52 +02:00
Cosmin Truta
9e4e247afb Update the copyright year 2026-01-07 15:47:43 +02:00
Cosmin Truta
e8d40e1280 Bump version to 1.6.54.git 2025-12-08 15:36:40 +02:00
Cosmin Truta
4e3f57d50f Release libpng version 1.6.53 2025-12-05 23:46:38 +02:00
Luis Caro Campos
ff615fdcaf build: Remove leftover ASM language from CMake project
Reported-by: Andrew Tribick <ajtribick@googlemail.com>
Reviewed-by: Cosmin Truta <ctruta@gmail.com>
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
2025-12-05 20:56:16 +02:00
Cosmin Truta
d7447f087b Bump version to 1.6.53.git 2025-12-05 11:32:17 +02:00
Cosmin Truta
fbed16182b Release libpng version 1.6.52 2025-12-03 21:48:14 +02:00
Cosmin Truta
cf53e54ccf Bump version to 1.6.52.git 2025-11-28 17:05:40 +02:00
Cosmin Truta
49363adcfa Release libpng version 1.6.51 2025-11-21 23:01:00 +02:00
Cosmin Truta
cf59edd364 Bump version to 1.6.51.git 2025-07-02 20:24:24 +03:00
Cosmin Truta
2b978915d8 Release libpng version 1.6.50 2025-07-01 23:50:00 +03:00
Cosmin Truta
7084241c75 Bump version to 1.6.50.git 2025-06-14 17:13:02 +03:00
Cosmin Truta
640204280f Release libpng version 1.6.49 2025-06-12 20:05:46 +03:00
Cosmin Truta
0cc6436ef5 build: Repair and reduce the CMake build dependency graph
A funny thing happened while refactoring the function argument parsing
in the `PNGGenConfig` module: the processing of dependencies inside
the CMake function `generate_copy` got fixed, thanks to an inadvertent
typo correction!

Going down the rabbit hole, we uncovered two issues:

 1. A typo in `scripts/cmake/PNGGenConfig.cmake` caused a dependency
    declaration to disappear, disrupting the graph. Fortunately, this
    disruption was being mitigated by an additional set of (redundant)
    symbolic target declarations that kept the CMake build going.

 2. The exact string matching inside `scripts/cmake/gensrc.cmake.in`
    imposed an artificial limitation, disallowing the use of absolute
    file paths.

The typo correction in (1), and the use of regex matching instead of
exact string matching in (2), allowed us to use absolute file paths
in the main CMake file, consistently, thus allowing CMake to recognize
them as uniquely-identifiable nodes in the dependency graph. There
should be no further need to have extra symbolic targets for proper
node identification.

In the end, we shaved off the redundant symbolic target declarations,
retaining only `png_genfiles` and `png_genprebuilt`.
2025-05-29 22:55:00 +03:00
Joost Nieuwenhuijse
dc71f481ff build: Fix apple-non-apple cross building
When cross compiling for an apple platform on a non-apple platform
(or the reverse), `if(APPLE)` in line 32 should refer to the target
platform. Without importing the `APPLE` variable, it refers to the
host platform.

Reviewed-by: John Bowler <jbowler@acm.org>
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
2025-05-28 17:24:21 +03:00
Filip Wasil
ffb8e8b26f Fix and improve the RISC-V Vector (RVV) implementation
Changes include manually merged code from Manfred SCHLAEGL.

Co-authored-by: Manfred SCHLAEGL <manfred.schlaegl@gmx.at>
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
2025-05-01 17:44:00 +03:00
Cosmin Truta
b4800bae33 Bump version to 1.6.49.git 2025-05-01 14:50:23 +03:00
Cosmin Truta
ea12796820 Release libpng version 1.6.48 2025-04-30 16:51:46 +03:00
Cosmin Truta
23bdc7a6c4 build: Add the CMake build option PNG_LIBCONF_HEADER
Running the pnglibconf scripts (script/*.awk) is not always possible.
An AWK interpreter is not always guaranteed to be available; and even
if it is, there are limitations when making cross-platform libpng
builds, especially when the differences between the host platform and
the target platform are significant. For example:
 * Building for the Windows (MinGW) target on a Unix development host;
 * Building for the iOS target on a macOS development host;
 * Building for the Android target on any development host.

In such scenarios, a preconfigured (i.e. prebuilt) pnglibconf.h file,
either taken from the libpng source tree or provided by the user who
wants to make a custom libpng build, becomes a necessity.

In this commit we introduce the build option `PNG_LIBCONF_HEADER` in
order to address this specific use case.

We also specify a version range (3.14...4.0) for the minimum required
CMake program, to future-proof the CMake build for just a little bit
longer.

Signed-off-by: Cosmin Truta <ctruta@gmail.com>
2025-04-28 20:44:53 +03:00
Cosmin Truta
5d09501462 Bump version to 1.6.48.git 2025-02-19 13:07:40 +02:00
Cosmin Truta
872555f4ba Release libpng version 1.6.47 2025-02-18 11:18:30 +02:00
John Bowler
a8242dd947 PNGv3 colourspace precedence rules conformance
This is a major change required by the new PNGv3 colour chunk precedence
rules.  It **does not** change the libpng API (png.h) however it changes
the following handling of PNG files:

IFF the PNG file contains colour space information it changes from the
libpng v3 behaviour to the now compulsory PNG v3 behaviour:

1) libpng no longer invalidates colour space chunks because they are
   inconsistent.
2) libpng no longer responds to the "png_get_" APIs positively if they
   are not present in the PNG but can be deduced from the colour space
   chunks that are present.
2025-01-27 10:59:33 -08:00
Cosmin Truta
171bdd3a6c Bump version to 1.6.47.git 2025-01-27 18:32:44 +02:00
Cosmin Truta
0024abd279 Release libpng version 1.6.46 2025-01-23 19:02:04 +02:00
Cosmin Truta
fcb0bca15f chore: Update the .editorconfig file; add/update README files
Add various missing pieces to their right places:
 * Update .editorconfig in order to let editorconfig-checker know that
   aclocal.m4 (which is auto-generated) may contain trailing whitespace.
 * Add ci/README.md.
 * Update scripts/README.txt.

TODO:
Integrate editorconfig-checker into the linting workflow on GitHub.
(See .github/workflows/lint.yml)
2025-01-22 23:19:49 +02:00
Cosmin Truta
9cc729b523 build: Update scripts/makefile.*
Apply the following updates:
 * Tidy up the compiler flag definitions.
 * Update the Darwin, Linux and MSYS makefiles to match the compiler
   flags used in scripts/makefile.clang and scripts/makefile.gcc.
 * Add the `pngtest-static` target in the Darwin makefile, following
   on the Linux makefile.
 * Rewrite some of the implicit make rules to match one another more
   consistently.
 * Make corrections in the copyright years to match git log.
2025-01-21 19:06:43 +02:00
Cosmin Truta
36a16fd761 build: Add scripts/makefile.c89; update other makefiles
Add scripts/makefile.c89 and refactor scripts/makefile.emcc,
scripts/makefile.clang and scripts/makefile.gcc

Refactor variable definitions inside scripts/makefile.clang,
scripts/makefile.gcc and scripts/makefile.emcc, and start using
the option `-pedantic-errors` unconditionally. This option was
first implemented in GCC version 3.1, and it was available in
Clang and in other Clang-based compilers (e.g. Emscripten) from
the beginning.

Add scripts/makefile.c89, derived from the above makefiles, but
with `-pedantic-errors -std=c89`. We aren't enabling the C89 level
by default, to avoid any incompatibility, whether intentional or
accidental, with the compiler's default language level. However,
we are still continuing to support C89 in the 'libpng16' branch,
and this special makefile can be used for testing purposes.
2025-01-21 18:42:49 +02:00
John Bowler
f753baae52 api(PNGv3): Update the generated files and PNG_EXPORT_LAST_ORDINAL
Apart from the png.h change, these files are machine-generated.

Reviewed-by: Cosmin Truta <ctruta@gmail.com>
Signed-off-by: John Bowler <jbowler@acm.org>
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
2025-01-08 23:22:50 +02:00
John Bowler
92e8581f12 api(PNGv3): Add support for mDCV and cLLI
This adds APIs to get/set the two remaining new PNG-v3 colour space
chunks.  The mDCV API matches that of cHRM.  Both chunks support
floating point APIs (all values in the two chunks are real numbers).

Both chunks have a new encoded type, a four-digit-precision fixed-point
number, which cannot be represented in the existing `png_fixed_point`
type, so a `png_uint_32` is used.

Test examples for cICP, cLLI and mDCV are now in pngtest.png, and a
necessary change to the pngunknown.c test program has been made to
accomodate the additions.

Reviewed-by: Cosmin Truta <ctruta@gmail.com>
Signed-off-by: John Bowler <jbowler@acm.org>
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
2025-01-08 23:22:50 +02:00
Cosmin Truta
8ffc967e8a Bump version to 1.6.46.git 2025-01-08 19:26:11 +02:00
Cosmin Truta
51f5bd68b9 Release libpng version 1.6.45 2025-01-07 18:31:22 +02:00
Cosmin Truta
3714c584b1 chore: Rerun ./autogen.sh --maintainer 2025-01-06 19:48:56 +02:00
Cosmin Truta
2a845ff819 build: Move portions from the main CMake file to separate modules
In preparation for the upcoming changes in the build system, any parts
of the CMake file that are unlikely to be affected should be moved out
of the way. This should facilitate an easier resync between the branch
'libpng16' and its successor(s).

Specifically:
 * Move the functions `generate_chk`, `generate_out`, `generate_source`
   and `generate_copy` to scripts/cmake/PNGGenConfig.cmake.
 * Move the function `png_add_test` to scripts/cmake/PNGTest.cmake.
 * Leave the function `create_symlink` in place, but add a TODO note.
   As we raised the minimum required CMake version to 3.14, we should
   now be able to use CMake's built-in function instead.
2025-01-06 17:09:10 +02:00
Cosmin Truta
823c2d80dc [libpng16] fix: Update the cICP support for better compliance with PNG-3
Apply the following corrections and improvements:
 * Add a validity check in `png_set_cICP`.
 * Fix the ordering check in `png_handle_cICP`.
 * Add a multiplicity check in `png_handle_cICP`.
 * Optimize the implementation of `png_write_cICP`.
 * Remove an unnecessary preprocessor guard from pngtest.c.
 * Update the dependency declaration in pnglibconf.dfa.
 * Fix the indentation where necessary.

This is a cherry-pick of commit c2a02691df1ecf51b7c97142752a7034350cb1f6
from branch 'libpng18'.
2025-01-02 11:15:20 +02:00