Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
49e12082
Commit
49e12082
authored
Jul 03, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
png: Import upstream release 1.6.40.
parent
681f04c3
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
66 additions
and
61 deletions
+66
-61
AUTHORS
libs/png/AUTHORS
+2
-0
LICENSE
libs/png/LICENSE
+2
-2
png.c
libs/png/png.c
+4
-4
png.h
libs/png/png.h
+11
-11
pngconf.h
libs/png/pngconf.h
+1
-1
pngget.c
libs/png/pngget.c
+12
-1
pngpriv.h
libs/png/pngpriv.h
+3
-3
pngset.c
libs/png/pngset.c
+24
-36
pngwrite.c
libs/png/pngwrite.c
+7
-3
No files found.
libs/png/AUTHORS
View file @
49e12082
...
...
@@ -22,6 +22,7 @@ Authors, for copyright and licensing purposes.
* Mike Klein
* Pascal Massimino
* Paul Schmidt
* Philippe Antoine
* Qiang Zhou
* Sam Bushell
* Samuel Williams
...
...
@@ -40,6 +41,7 @@ Authors, for copyright and licensing purposes.
- Matt Sarett
- Mike Klein
- Sami Boukortt
- Wan-Teh Chang
The build projects, the build scripts, the test scripts, and other
files in the "ci", "projects", "scripts" and "tests" directories, have
...
...
libs/png/LICENSE
View file @
49e12082
...
...
@@ -4,8 +4,8 @@ COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
PNG Reference Library License version 2
---------------------------------------
* Copyright (c) 1995-202
2
The PNG Reference Library Authors.
* Copyright (c) 2018-202
2
Cosmin Truta.
* Copyright (c) 1995-202
3
The PNG Reference Library Authors.
* Copyright (c) 2018-202
3
Cosmin Truta.
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
* Copyright (c) 1996-1997 Andreas Dilger.
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
...
...
libs/png/png.c
View file @
49e12082
/* png.c - location for general purpose libpng functions
*
* Copyright (c) 2018-202
2
Cosmin Truta
* Copyright (c) 2018-202
3
Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
...
...
@@ -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_
39
Your_png_h_is_not_version_1_6_39
;
typedef
png_libpng_version_1_6_
40
Your_png_h_is_not_version_1_6_40
;
#ifdef __GNUC__
/* The version tests may need to be added to, but the problem warning has
...
...
@@ -815,8 +815,8 @@ png_get_copyright(png_const_structrp png_ptr)
return
PNG_STRING_COPYRIGHT
#else
return
PNG_STRING_NEWLINE
\
"libpng version 1.6.
39
"
PNG_STRING_NEWLINE
\
"Copyright (c) 2018-202
2
Cosmin Truta"
PNG_STRING_NEWLINE
\
"libpng version 1.6.
40
"
PNG_STRING_NEWLINE
\
"Copyright (c) 2018-202
3
Cosmin Truta"
PNG_STRING_NEWLINE
\
"Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson"
\
PNG_STRING_NEWLINE
\
"Copyright (c) 1996-1997 Andreas Dilger"
PNG_STRING_NEWLINE
\
...
...
libs/png/png.h
View file @
49e12082
/* png.h - header file for PNG reference library
*
* libpng version 1.6.
39 - November 20, 2022
* libpng version 1.6.
40
*
* Copyright (c) 2018-202
2
Cosmin Truta
* Copyright (c) 2018-202
3
Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
...
...
@@ -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.
39, November 2022
:
* libpng versions 1.6.36, December 2018, through 1.6.
40, June 2023
:
* Cosmin Truta
* See also "Contributing Authors", below.
*/
...
...
@@ -27,8 +27,8 @@
* PNG Reference Library License version 2
* ---------------------------------------
*
* * Copyright (c) 1995-202
2
The PNG Reference Library Authors.
* * Copyright (c) 2018-202
2
Cosmin Truta.
* * Copyright (c) 1995-202
3
The PNG Reference Library Authors.
* * Copyright (c) 2018-202
3
Cosmin Truta.
* * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
* * Copyright (c) 1996-1997 Andreas Dilger.
* * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
...
...
@@ -239,7 +239,7 @@
* ...
* 1.5.30 15 10530 15.so.15.30[.0]
* ...
* 1.6.
39 16 10639 16.so.16.39
[.0]
* 1.6.
40 16 10640 16.so.16.40
[.0]
*
* Henceforth the source version will match the shared-library major and
* minor numbers; the shared-library major version number will be used for
...
...
@@ -278,8 +278,8 @@
*/
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.6.
39
"
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.
39 - November 20, 2022
\n"
#define PNG_LIBPNG_VER_STRING "1.6.
40
"
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.
40 - June 21, 2023
\n"
#define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_DLLNUM 16
...
...
@@ -287,7 +287,7 @@
/* 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
39
#define PNG_LIBPNG_VER_RELEASE
40
/* This should be zero for a public release, or non-zero for a
* development version. [Deprecated]
...
...
@@ -318,7 +318,7 @@
* From version 1.0.1 it is:
* XXYYZZ, where XX=major, YY=minor, ZZ=release
*/
#define PNG_LIBPNG_VER 106
39
/* 1.6.39
*/
#define PNG_LIBPNG_VER 106
40
/* 1.6.40
*/
/* Library configuration: these options cannot be changed after
* the library has been built.
...
...
@@ -428,7 +428,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_
39
;
typedef
char
*
png_libpng_version_1_6_
40
;
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
*
...
...
libs/png/pngconf.h
View file @
49e12082
/* pngconf.h - machine-configurable file for libpng
*
* libpng version 1.6.
39
* libpng version 1.6.
40
*
* Copyright (c) 2018-2022 Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
...
...
libs/png/pngget.c
View file @
49e12082
/* pngget.c - retrieval of values from info struct
*
* Copyright (c) 2018 Cosmin Truta
* Copyright (c) 2018
-2023
Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
...
...
@@ -21,7 +21,18 @@ png_get_valid(png_const_structrp png_ptr, png_const_inforp info_ptr,
png_uint_32
flag
)
{
if
(
png_ptr
!=
NULL
&&
info_ptr
!=
NULL
)
{
#ifdef PNG_READ_tRNS_SUPPORTED
/* png_handle_PLTE() may have canceled a valid tRNS chunk but left the
* 'valid' flag for the detection of duplicate chunks. Do not report a
* valid tRNS chunk in this case.
*/
if
(
flag
==
PNG_INFO_tRNS
&&
png_ptr
->
num_trans
==
0
)
return
(
0
);
#endif
return
(
info_ptr
->
valid
&
flag
);
}
return
(
0
);
}
...
...
libs/png/pngpriv.h
View file @
49e12082
/* pngpriv.h - private declarations for use inside libpng
*
* Copyright (c) 2018-202
2
Cosmin Truta
* Copyright (c) 2018-202
3
Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
...
...
@@ -626,7 +626,7 @@
#define PNG_BACKGROUND_IS_GRAY 0x800U
#define PNG_HAVE_PNG_SIGNATURE 0x1000U
#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000U
/* Have another chunk after IDAT */
/* 0x4000U (unused) */
#define PNG_WROTE_eXIf 0x4000U
#define PNG_IS_READ_STRUCT 0x8000U
/* Else is a write struct */
/* Flags for the transformations the PNG library does on the image data */
...
...
@@ -1910,7 +1910,7 @@ PNG_INTERNAL_FUNCTION(void,png_ascii_from_fixed,(png_const_structrp png_ptr,
*/
#define PNG_FP_INVALID 512
/* Available for callers as a distinct value */
/* Result codes for the parser (boolean - true mean
t
s ok, false means
/* Result codes for the parser (boolean - true means ok, false means
* not ok yet.)
*/
#define PNG_FP_MAYBE 0
/* The number may be valid in the future */
...
...
libs/png/pngset.c
View file @
49e12082
/* pngset.c - storage of image information into info struct
*
* Copyright (c) 2018-202
2
Cosmin Truta
* Copyright (c) 2018-202
3
Cosmin Truta
* Copyright (c) 1998-2018 Glenn Randers-Pehrson
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
...
...
@@ -137,46 +137,40 @@ png_set_cHRM_XYZ(png_const_structrp png_ptr, png_inforp info_ptr, double red_X,
#ifdef PNG_eXIf_SUPPORTED
void
PNGAPI
png_set_eXIf
(
png_const_structrp
png_ptr
,
png_inforp
info_ptr
,
png_bytep
e
XIf_bu
f
)
png_bytep
e
xi
f
)
{
png_warning
(
png_ptr
,
"png_set_eXIf does not work; use png_set_eXIf_1"
);
PNG_UNUSED
(
info_ptr
)
PNG_UNUSED
(
e
XIf_bu
f
)
PNG_UNUSED
(
e
xi
f
)
}
void
PNGAPI
png_set_eXIf_1
(
png_const_structrp
png_ptr
,
png_inforp
info_ptr
,
png_uint_32
num_exif
,
png_bytep
e
XIf_bu
f
)
png_uint_32
num_exif
,
png_bytep
e
xi
f
)
{
int
i
;
png_bytep
new_exif
;
png_debug1
(
1
,
"in %s storage function"
,
"eXIf"
);
if
(
png_ptr
==
NULL
||
info_ptr
==
NULL
)
if
(
png_ptr
==
NULL
||
info_ptr
==
NULL
||
(
png_ptr
->
mode
&
PNG_WROTE_eXIf
)
!=
0
)
return
;
if
(
info_ptr
->
exif
)
{
png_free
(
png_ptr
,
info_ptr
->
exif
);
info_ptr
->
exif
=
NULL
;
}
new_exif
=
png_voidcast
(
png_bytep
,
png_malloc_warn
(
png_ptr
,
num_exif
));
info_ptr
->
num_exif
=
num_exif
;
info_ptr
->
exif
=
png_voidcast
(
png_bytep
,
png_malloc_warn
(
png_ptr
,
info_ptr
->
num_exif
));
if
(
info_ptr
->
exif
==
NULL
)
if
(
new_exif
==
NULL
)
{
png_warning
(
png_ptr
,
"Insufficient memory for eXIf chunk data"
);
return
;
}
info_ptr
->
free_me
|=
PNG_FREE_EXIF
;
memcpy
(
new_exif
,
exif
,
(
size_t
)
num_exif
)
;
for
(
i
=
0
;
i
<
(
int
)
info_ptr
->
num_exif
;
i
++
)
info_ptr
->
exif
[
i
]
=
eXIf_buf
[
i
];
png_free_data
(
png_ptr
,
info_ptr
,
PNG_FREE_EXIF
,
0
);
info_ptr
->
num_exif
=
num_exif
;
info_ptr
->
exif
=
new_exif
;
info_ptr
->
free_me
|=
PNG_FREE_EXIF
;
info_ptr
->
valid
|=
PNG_INFO_eXIf
;
}
#endif
/* eXIf */
...
...
@@ -237,15 +231,13 @@ png_set_hIST(png_const_structrp png_ptr, png_inforp info_ptr,
if
(
info_ptr
->
hist
==
NULL
)
{
png_warning
(
png_ptr
,
"Insufficient memory for hIST chunk data"
);
return
;
}
info_ptr
->
free_me
|=
PNG_FREE_HIST
;
for
(
i
=
0
;
i
<
info_ptr
->
num_palette
;
i
++
)
info_ptr
->
hist
[
i
]
=
hist
[
i
];
info_ptr
->
free_me
|=
PNG_FREE_HIST
;
info_ptr
->
valid
|=
PNG_INFO_hIST
;
}
#endif
...
...
@@ -367,6 +359,8 @@ png_set_pCAL(png_const_structrp png_ptr, png_inforp info_ptr,
memcpy
(
info_ptr
->
pcal_purpose
,
purpose
,
length
);
info_ptr
->
free_me
|=
PNG_FREE_PCAL
;
png_debug
(
3
,
"storing X0, X1, type, and nparams in info"
);
info_ptr
->
pcal_X0
=
X0
;
info_ptr
->
pcal_X1
=
X1
;
...
...
@@ -383,7 +377,6 @@ png_set_pCAL(png_const_structrp png_ptr, png_inforp info_ptr,
if
(
info_ptr
->
pcal_units
==
NULL
)
{
png_warning
(
png_ptr
,
"Insufficient memory for pCAL units"
);
return
;
}
...
...
@@ -395,7 +388,6 @@ png_set_pCAL(png_const_structrp png_ptr, png_inforp info_ptr,
if
(
info_ptr
->
pcal_params
==
NULL
)
{
png_warning
(
png_ptr
,
"Insufficient memory for pCAL params"
);
return
;
}
...
...
@@ -413,7 +405,6 @@ png_set_pCAL(png_const_structrp png_ptr, png_inforp info_ptr,
if
(
info_ptr
->
pcal_params
[
i
]
==
NULL
)
{
png_warning
(
png_ptr
,
"Insufficient memory for pCAL parameter"
);
return
;
}
...
...
@@ -421,7 +412,6 @@ png_set_pCAL(png_const_structrp png_ptr, png_inforp info_ptr,
}
info_ptr
->
valid
|=
PNG_INFO_pCAL
;
info_ptr
->
free_me
|=
PNG_FREE_PCAL
;
}
#endif
...
...
@@ -478,18 +468,17 @@ png_set_sCAL_s(png_const_structrp png_ptr, png_inforp info_ptr,
if
(
info_ptr
->
scal_s_height
==
NULL
)
{
png_free
(
png_ptr
,
info_ptr
->
scal_s_width
);
png_free
(
png_ptr
,
info_ptr
->
scal_s_width
);
info_ptr
->
scal_s_width
=
NULL
;
png_warning
(
png_ptr
,
"Memory allocation failed while processing sCAL"
);
return
;
}
memcpy
(
info_ptr
->
scal_s_height
,
sheight
,
lengthh
);
info_ptr
->
valid
|=
PNG_INFO_sCAL
;
info_ptr
->
free_me
|=
PNG_FREE_SCAL
;
info_ptr
->
valid
|=
PNG_INFO_sCAL
;
}
# ifdef PNG_FLOATING_POINT_SUPPORTED
...
...
@@ -625,11 +614,10 @@ png_set_PLTE(png_structrp png_ptr, png_inforp info_ptr,
if
(
num_palette
>
0
)
memcpy
(
png_ptr
->
palette
,
palette
,
(
unsigned
int
)
num_palette
*
(
sizeof
(
png_color
)));
info_ptr
->
palette
=
png_ptr
->
palette
;
info_ptr
->
num_palette
=
png_ptr
->
num_palette
=
(
png_uint_16
)
num_palette
;
info_ptr
->
free_me
|=
PNG_FREE_PLTE
;
info_ptr
->
valid
|=
PNG_INFO_PLTE
;
}
...
...
@@ -1020,8 +1008,8 @@ png_set_tRNS(png_structrp png_ptr, png_inforp info_ptr,
png_malloc
(
png_ptr
,
PNG_MAX_PALETTE_LENGTH
));
memcpy
(
info_ptr
->
trans_alpha
,
trans_alpha
,
(
size_t
)
num_trans
);
info_ptr
->
valid
|=
PNG_INFO_tRNS
;
info_ptr
->
free_me
|=
PNG_FREE_TRNS
;
info_ptr
->
valid
|=
PNG_INFO_tRNS
;
}
png_ptr
->
trans_alpha
=
info_ptr
->
trans_alpha
;
}
...
...
@@ -1054,8 +1042,8 @@ png_set_tRNS(png_structrp png_ptr, png_inforp info_ptr,
if
(
num_trans
!=
0
)
{
info_ptr
->
valid
|=
PNG_INFO_tRNS
;
info_ptr
->
free_me
|=
PNG_FREE_TRNS
;
info_ptr
->
valid
|=
PNG_INFO_tRNS
;
}
}
#endif
...
...
@@ -1089,11 +1077,11 @@ png_set_sPLT(png_const_structrp png_ptr,
{
/* Out of memory or too many chunks */
png_chunk_report
(
png_ptr
,
"too many sPLT chunks"
,
PNG_CHUNK_WRITE_ERROR
);
return
;
}
png_free
(
png_ptr
,
info_ptr
->
splt_palettes
);
info_ptr
->
splt_palettes
=
np
;
info_ptr
->
free_me
|=
PNG_FREE_SPLT
;
...
...
@@ -1247,11 +1235,11 @@ png_set_unknown_chunks(png_const_structrp png_ptr,
{
png_chunk_report
(
png_ptr
,
"too many unknown chunks"
,
PNG_CHUNK_WRITE_ERROR
);
return
;
}
png_free
(
png_ptr
,
info_ptr
->
unknown_chunks
);
info_ptr
->
unknown_chunks
=
np
;
/* safe because it is initialized */
info_ptr
->
free_me
|=
PNG_FREE_UNKN
;
...
...
libs/png/pngwrite.c
View file @
49e12082
/* pngwrite.c - general routines to write a PNG file
*
* Copyright (c) 2018-202
2
Cosmin Truta
* Copyright (c) 2018-202
3
Cosmin Truta
* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
* Copyright (c) 1996-1997 Andreas Dilger
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
...
...
@@ -239,7 +239,10 @@ png_write_info(png_structrp png_ptr, png_const_inforp info_ptr)
#ifdef PNG_WRITE_eXIf_SUPPORTED
if
((
info_ptr
->
valid
&
PNG_INFO_eXIf
)
!=
0
)
{
png_write_eXIf
(
png_ptr
,
info_ptr
->
exif
,
info_ptr
->
num_exif
);
png_ptr
->
mode
|=
PNG_WROTE_eXIf
;
}
#endif
#ifdef PNG_WRITE_hIST_SUPPORTED
...
...
@@ -439,8 +442,9 @@ png_write_end(png_structrp png_ptr, png_inforp info_ptr)
#endif
#ifdef PNG_WRITE_eXIf_SUPPORTED
if
((
info_ptr
->
valid
&
PNG_INFO_eXIf
)
!=
0
)
png_write_eXIf
(
png_ptr
,
info_ptr
->
exif
,
info_ptr
->
num_exif
);
if
((
info_ptr
->
valid
&
PNG_INFO_eXIf
)
!=
0
&&
(
png_ptr
->
mode
&
PNG_WROTE_eXIf
)
==
0
)
png_write_eXIf
(
png_ptr
,
info_ptr
->
exif
,
info_ptr
->
num_exif
);
#endif
#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment