1
0
mirror of https://github.com/glennrp/libpng.git synced 2026-10-24 08:39:18 +03:00

1441 Commits

Author SHA1 Message Date
Cosmin Truta
0eb0c29eca Merge tag 'v1.6.59' into branch 'libpng18' into develop 2026-09-30 11:59:55 +03:00
yaito3014
d733c11206 fix(build): Use space-separated string for CMAKE_REQUIRED_FLAGS
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
0bb2bb50e3 build: Fix wrong symlink created for import library on MinGW and Cygwin
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
eb1662b428 Merge tag 'v1.6.56' into branch 'libpng18' into develop 2026-03-27 13:44:48 +02:00
Cosmin Truta
28cb99fe65 build: Remove 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.
2026-03-06 17:58:06 +02:00
Cosmin Truta
9bde1b7dbf Merge tag 'v1.6.55' into branch 'libpng18' into develop 2026-02-11 14:57:41 +02:00
Cosmin Truta
28ae89ed6d Merge tag 'v1.6.55' into libpng18 2026-02-11 14:57:41 +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
09cf01d91e Merge tag 'v1.6.54' into branch 'libpng18' into develop 2026-02-06 21:19:42 +02:00
Cosmin Truta
96c78de6d5 Merge tag 'v1.6.54' into libpng18 2026-02-06 21:19:42 +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
ceaf107b86 Merge tag 'v1.6.53' into branch 'libpng18' into develop 2025-12-08 11:56:59 +02:00
Cosmin Truta
bb6411539c Merge tag 'v1.6.53' into libpng18 2025-12-08 11:56:59 +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
a532f48615 Merge tag 'v1.6.51' into branch 'libpng18' into develop 2025-11-24 20:58:17 +02:00
Cosmin Truta
49363adcfa Release libpng version 1.6.51 2025-11-21 23:01:00 +02:00
Cosmin Truta
465f654c68 api! Remove the experimental (and incomplete) ERROR_NUMBERS feature
The purpose of this feature was to optionally prepend standardized
numbers to error and warning messages. The ERROR_NUMBERS feature was
first drafted in libpng-1.2.0 and further developed in libpng-1.4.0;
and yet, it was always disabled by default, and never completed.

In the light of a recent report concerning the security hazards arising
from enabling this code in custom libpng builds, we think it's best to
simply remove all the code written to support this feature.

Reported-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
2025-09-29 15:44:46 +03:00
Cosmin Truta
a92c7d779f Introduce APNG support -- patch applied, animations unlocked!
This is a cherry-pick of commit 7d55a836ae
from branch 'develop'.

Co-authored-by: Daisuke Nishikawa <daisuken@users.sourceforge.net>
Reviewed-by: John Bowler <jbowler@acm.org>
Reviewed-by: Maarten Bent <MaartenBent@users.noreply.github.com>
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
2025-07-14 18:23:07 +03: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
7d55a836ae Introduce APNG support -- patch applied, animations unlocked!
Co-authored-by: Daisuke Nishikawa <daisuken@users.sourceforge.net>
Reviewed-by: John Bowler <jbowler@acm.org>
Reviewed-by: Maarten Bent <MaartenBent@users.noreply.github.com>
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
2025-06-27 19:39:54 +03:00
Cosmin Truta
151523b6b3 Create the branch 'develop' for libpng version 2 alpha 2025-06-14 19:00:00 +03:00
Cosmin Truta
7084241c75 Bump version to 1.6.50.git 2025-06-14 17:13:02 +03:00
Cosmin Truta
982d4dd815 Merge tag 'v1.6.49' into libpng18 2025-06-13 19:22:55 +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
09c09efd88 Merge tag 'v1.6.48' into libpng18 2025-04-30 22:26:40 +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
d35fa11425 Merge tag 'v1.6.47' into libpng18
Sync with libpng version 1.6.47
2025-02-18 21:43:14 +02:00
Cosmin Truta
872555f4ba Release libpng version 1.6.47 2025-02-18 11:18:30 +02:00
Cosmin Truta
91c396c48c build: Fix pnglibconf for the awk implementations that lack asort 2025-02-17 17:58:55 +02:00
Cosmin Truta
f6aa44850c build: Move the pnglibconf files and scripts to scripts/pnglibconf/
Considering that pnglibconf is a whole mini-system for configuring and
building libpng, it should be placed in its own dedicated subdirectory.
Any future additions, including tests and documentation, should go into
this subdirectory.

One exception: pnglibconf.h.prebuilt is moved to the top-level source
directory, where pnglibconf.h would be. This follows the organization
pattern typically used with the "*.in" files, for example.

All references to the pnglibconf artifacts, found in machine-readable
code and in human-readable comments, are updated accordingly.
2025-02-02 22:18:39 +02:00
Cosmin Truta
c4780f33a1 api(Windows): Remove the ordinals attached to exported functions
In order to make ABI compatibility guarantees about the Windows DLL,
we had to keep maintaining the API ordinals consistently. As we are
now designing a fresh new ABI, we use this opportunity to stop using
ordinals altogether.

Exporting API functions by ordinal numbers instead of names was a
necessity in the early (16-bit) versions of Windows, by design, to
minimize the memory requirements. Although using ordinals was still
possible in all subsequent versions of Windows, it was no longer
necessary from the 32-bit versions of Windows onwards.

The libpng DLL will still have ordinals, assigned arbitrarily, but
the dynamic linking of applications to this DLL will be done by name.
(The applications that use the zlib DLL operate in the same manner.)

Reviewed-by: John Bowler <jbowler@acm.org>
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
2025-02-01 12:02:05 +02:00
Cosmin Truta
363aa62476 chore: Reformat the awk scripts using 1TBS
Apply the stylishness of the One True Brace Style to scripts/*.awk.
Also rename the debug variable, and tidy up comments and whitespace.

TODO:
Run this task during linting, e.g., by using "prettier" with a plugin.
2025-01-31 16:53:18 +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
d60d8888c9 Merge tag 'v1.6.46' into libpng18
Sync with libpng version 1.6.46
2025-01-27 17:44:52 +02:00