John Bowler
d7d950e8bd
[libpng16] chore: Clean up the leading blank lines from all source files
...
The leading blank lines are apparently an artefact of an older source
control system. They are not required and they look like accidents,
because starting a source file with a blank line is not a regular habit
of software developers nowadays.
This is a cherry-pick of commit 37cc20add8fb5b83bb5299a26cd3b41e0f776017
from branch 'libpng18'.
Signed-off-by: John Bowler <jbowler@acm.org>
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
2024-10-11 11:51:04 +03:00
Cosmin Truta
27e548af25
chore: Clean up the return statements and update example.c accordingly
2024-01-23 21:25:03 +02:00
Cosmin Truta
689e06516b
Clean up vestigial uses of png_size_tp
2022-11-20 17:51:33 +02:00
Cosmin Truta
ceb327789b
Remove top-level const from function-scope variables
...
As per the const correctness rules, top-level const-ness of data
in automatic scopes does not propagate outside of these scopes
(unlike const-ness at lower levels, such as pointers to const data).
Previously, const was used liberally, but inconsistently across the
libpng codebase. Using const wherever applicable is not incorrect.
However, _consistent_ use of const is difficult to maintain in such
conditions.
In conclusion, we shall continue to use const only where doing so is
strictly necessary:
1. If a function guarantees that it will not modify an argument
passed by pointer, the corresponding function parameter should be
a pointer-to-const (const T *).
2. Static data should not be modified, therefore it should be const.
Reference:
Google C++ Style Guide
https://google.github.io/styleguide/cppguide.html#Use_of_const
2018-08-18 22:47:16 -04:00
Cosmin Truta
1ef8882814
Replace the remaining uses of PNG_CONST with const
...
In v1.6.0, compiler support for const became a requirement.
It should be used consistently. To maintain backwards compatibility,
PNG_CONST is still maintained in deprecated form.
2018-08-18 21:01:02 -04:00
Cosmin Truta
a873893279
Remove the "last changed" version information from source comments
...
This information is maintained by the version control system.
2018-07-28 18:47:21 -04:00
Cosmin Truta
46aedd8961
Release libpng version 1.6.35
2018-07-15 23:58:00 -04:00
Cosmin Truta
a74aa9a002
[libpng16] Replace the remaining uses of png_size_t with size_t
...
In v1.6.0, size_t became a required type. It should be used
consistently. To maintain backwards compatibility, png_size_t
is still maintained in deprecated form.
2018-06-17 22:37:44 -04:00
Glenn Randers-Pehrson
58720d3c06
[libpng16] Fix "last changed" dates
2017-08-29 12:29:03 -05:00
Glenn Randers-Pehrson
f6ca33d42c
[libpng16] Bump version to 1.6.33beta01
2017-08-25 18:54:30 -05:00
Glenn Randers-Pehrson
df7e9dae0c
[libpng16] Imported from libpng-1.6.32.tar
2017-08-24 16:39:02 -05:00
Glenn Randers-Pehrson
3524b0d201
[libpng16] Update "Last changed" dates and some copyright years
2017-07-31 17:03:17 -05:00
Glenn Randers-Pehrson
40afb68570
[libpng16] Added calls to png_handle_eXIf(() in pngread.c and png_write_eXIf()
...
in pngwrite.c, and made various other fixes to png_write_eXIf().
Eliminated png_ptr->num_exif member from pngstruct.h and added num_exif
to arguments for png_get_eXIf() and png_set_eXIf().
2017-07-31 14:21:46 -05:00
Glenn Randers-Pehrson
68cb0aaee3
[libpng16] Implement eXIf chunk support
2017-07-13 11:22:48 -05:00
Glenn Randers-Pehrson
5aaf6e889c
[libpng16] Imported from libpng-1.6.30beta04.tar
2017-06-06 19:38:17 -05:00
Glenn Randers-Pehrson
c548328904
[libpng16] Avoid writing an empty IDAT when the last IDAT exactly fills the
...
compression buffer (bug report by Brian Baird). This bug was introduced in
libpng-1.6.0.
2017-06-06 18:40:45 -05:00
Glenn Randers-Pehrson
f604c74a5f
[libpng16] Avoid conditional directives that break statements in pngrutil.c (Romero
...
Malaquias)
2017-01-20 14:46:21 -06:00
Romero B. de S. Malaquias
c3f4e5fb1a
Avoiding conditional directives that break statements
2017-01-20 16:31:54 -03:00
Glenn Randers-Pehrson
0c440812db
[libpng16] Imported from libpng-1.6.26.tar
2016-10-19 19:11:38 -05:00
Glenn Randers-Pehrson
565a751ca2
[libpng16] Quieted (bogus?) clang warnings about "absolute value has no effect".
2016-10-02 20:16:36 -05:00
Glenn Randers-Pehrson
761d833372
[libpng16] Quieted all remaining -Wconversion compiler warnings
2016-10-02 18:46:35 -05:00
Glenn Randers-Pehrson
ad3318ddc8
[libpng16] Bump version to 1.6.26beta03
2016-10-01 19:44:42 -05:00
Glenn Randers-Pehrson
1b363fa6b0
[libpng16] Quieted 116 (out of 288) -Wconversion compiler warnings by changing
...
flag definitions in pngpriv.h from 0xnnnn to 0xnnnnU and trivial changes
in png.c, pngread.c, and pngwutil.c.
2016-09-30 17:19:12 -05:00
Glenn Randers-Pehrson
217546ae43
[libpng16] Imported from libpng-1.6.26beta01.tar
2016-09-26 08:57:44 -05:00
Glenn Randers-Pehrson
b50d5cea2b
[libpng16] Imported from libpng-1.6.24.tar
2016-08-03 21:32:26 -05:00
Glenn Randers-Pehrson
dd70604cec
[libpng16] Fixed more indentation
2016-07-15 11:20:46 -05:00
Glenn Randers-Pehrson
5d7c7d5132
[libpng16] Fixed a harmless typo in pngwutil.c
2016-07-13 14:45:10 -05:00
Glenn Randers-Pehrson
f7d5419816
[libpng16] Avoid filter-selection heuristic sum calculations in cases where
...
only one filter is a candidate for selection. This trades off code size (added
png_setup_*_row_only() functions) for speed.
2016-07-08 10:09:25 -05:00
Glenn Randers-Pehrson
d9779744f9
[libpng16] Optimized absolute value calculation in filter selection, similar to
...
code in the PAETH decoder in pngrutil.c. Build with PNG_USE_ABS to use this.
2016-06-29 21:53:57 -05:00
Glenn Randers-Pehrson
3f2879bf60
[libpng16] Imported from libpng-1.6.24beta02.tar
2016-06-23 11:26:59 -05:00
Glenn Randers-Pehrson
4b4a9583b4
[libpng16] Imported from libpng-1.6.24beta02.tar
2016-06-23 11:08:06 -05:00
John Bowler
1df0ace0b4
Fix MSVC Level 2 warning
...
MSVC doesn't like '-(unsigned)', so replace it by 0U-(unsigned) (in 1.6).
Signed-off-by: John Bowler <jbowler@acm.org>
2016-06-22 17:35:49 -07:00
Glenn Randers-Pehrson
147dc568da
[libpng16] Backed out previous optimization; the compiler should handle that.
2016-06-19 22:20:52 -05:00
Glenn Randers-Pehrson
29135161d7
[libpng16] Avoid filter-selection heuristic sum calculations in cases where
...
only one filter is a candidate for selection. This trades off code size (added
png_setup_*_row_only() functions) for speed.
2016-06-19 18:43:35 -05:00
John Bowler
9c04f57cab
[libpng15] Corrected filter heuristic overflow handling.
2016-06-19 18:01:33 -05:00
Glenn Randers-Pehrson
ac43a87820
[libpng16] Imported from libpng-1.6.22.tar
2016-05-26 07:25:14 -05:00
Glenn Randers-Pehrson
1a3fa1e091
[libpng16] Imported from libpng-1.6.22beta03.tar
2016-03-09 12:04:40 -06:00
Glenn Randers-Pehrson
baf301d122
[libpng16] Restored "& 0xff" in png_save_uint_16() and png_save_uint_32() that
...
were accidentally removed from libpng-1.6.17.
2016-02-13 12:01:35 -06:00
Glenn Randers-Pehrson
5031c77d85
[libpng16] Bump version to 1.6.22beta01
2016-01-16 08:00:09 -06:00
Glenn Randers-Pehrson
fc0786a442
[libpng16] Imported from libpng-1.6.21.tar
2016-01-15 13:51:06 -06:00
Glenn Randers-Pehrson
66db757dd4
[libpng16] Happy 2016! Updated copyright year
2016-01-02 13:40:27 -06:00
Glenn Randers-Pehrson
975cbbb029
[libpng16] Moved png_check_keyword() from pngwutil.c to pngset.c
2015-12-13 15:04:18 -06:00
Glenn Randers-Pehrson
92ec30a3b1
[libpng16] Imported from libpng-1.6.20beta03.tar
2015-11-24 09:34:02 -06:00
Glenn Randers-Pehrson
415d26805a
[libpng16] Imported from libpng-1.6.19.tar
2015-11-12 07:13:31 -06:00
Glenn Randers-Pehrson
a901eb3ce6
[libpng16] Prevent reading over-length PLTE chunk (Cosmin Truta).
2015-10-30 07:57:49 -05:00
Glenn Randers-Pehrson
81f44665cc
[libpng16] Reject attempt to write over-length PLTE chunk
2015-10-29 09:26:41 -05:00
Glenn Randers-Pehrson
a8242fe6fb
[libng16] Reverted recent mistaken change of 0xnnnn to 0xnnnnUL
2015-08-17 20:46:27 -05:00
Glenn Randers-Pehrson
d8b93c29a7
[libpng16] Appended more "UL" to hex constants.
2015-08-17 10:56:17 -05:00
Glenn Randers-Pehrson
8ba4b13c55
[libpng16] Changed 0xnnnn constants to 0xnnnnUL.
2015-08-16 22:49:58 -05:00
Glenn Randers-Pehrson
8b83ff3704
[libpng16] Change "n bit" to "n-bit" in comments.
2015-08-13 20:57:18 -05:00