VirtualBox

source: vbox/trunk/doc/manual/en_US/dita/topics/licensing/vbox-base/licensing-license-vbox-base-libpng-1.6.43.dita

Last change on this file was 105933, checked in by vboxsync, 8 months ago

Docs: bugref:10705. Updating licensing chapter by copying dita files from docs team's repo. Plus some modifications.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 119.0 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
3<topic xml:lang="en-us" id="license-libpng-1.6.43">
4
5 <title>libpng</title>
6
7 <body>
8 <pre xml:space="preserve">## libpng v1.6.43
9
10### libpng License
11&lt;pre&gt;
12
13COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
14=========================================
15
16PNG Reference Library License version 2
17---------------------------------------
18
19Copyright (C) 1995-2024 The PNG Reference Library Authors.
20Copyright (C) 2018-2024 Cosmin Truta
21Copyright (C) 1998-2018 Glenn Randers-Pehrson
22Copyright (C) 1996-1997 Andreas Dilger
23Copyright (C) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
24
25The software is supplied &#34;as is&#34;, without warranty of any kind,
26express or implied, including, without limitation, the warranties
27of merchantability, fitness for a particular purpose, title, and
28non-infringement. In no event shall the Copyright owners, or
29anyone distributing the software, be liable for any damages or
30other liability, whether in contract, tort or otherwise, arising
31from, out of, or in connection with the software, or the use or
32other dealings in the software, even if advised of the possibility
33of such damage.
34
35Permission is hereby granted to use, copy, modify, and distribute
36this software, or portions hereof, for any purpose, without fee,
37subject to the following restrictions:
38
39 1. The origin of this software must not be misrepresented; you
40 must not claim that you wrote the original software. If you
41 use this software in a product, an acknowledgment in the product
42 documentation would be appreciated, but is not required.
43
44 2. Altered source versions must be plainly marked as such, and must
45 not be misrepresented as being the original software.
46
47 3. This Copyright notice may not be removed or altered from any
48 source or altered source distribution.
49
50
51PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35)
52-----------------------------------------------------------------------
53
54libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are
55Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
56derived from libpng-1.0.6, and are distributed according to the same
57disclaimer and license as libpng-1.0.6 with the following individuals
58added to the list of Contributing Authors:
59
60 Simon-Pierre Cadieux
61 Eric S. Raymond
62 Mans Rullgard
63 Cosmin Truta
64 Gilles Vollant
65 James Yu
66 Mandar Sahastrabuddhe
67 Google Inc.
68 Vadim Barkov
69
70and with the following additions to the disclaimer:
71
72 There is no warranty against interference with your enjoyment of
73 the library or against infringement. There is no warranty that our
74 efforts or the library will fulfill any of your particular purposes
75 or needs. This library is provided with all faults, and the entire
76 risk of satisfactory quality, performance, accuracy, and effort is
77 with the user.
78
79Some files in the &#34;contrib&#34; directory and some configure-generated
80files that are distributed with libpng have other copyright owners, and
81are released under other open source licenses.
82
83libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
84Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
85libpng-0.96, and are distributed according to the same disclaimer and
86license as libpng-0.96, with the following individuals added to the
87list of Contributing Authors:
88
89 Tom Lane
90 Glenn Randers-Pehrson
91 Willem van Schaik
92
93libpng versions 0.89, June 1996, through 0.96, May 1997, are
94Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
95and are distributed according to the same disclaimer and license as
96libpng-0.88, with the following individuals added to the list of
97Contributing Authors:
98
99 John Bowler
100 Kevin Bracey
101 Sam Bushell
102 Magnus Holmgren
103 Greg Roelofs
104 Tom Tanner
105
106Some files in the &#34;scripts&#34; directory have other copyright owners,
107but are released under this license.
108
109libpng versions 0.5, May 1995, through 0.88, January 1996, are
110Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
111
112For the purposes of this copyright and license, &#34;Contributing Authors&#34;
113is defined as the following set of individuals:
114
115 Andreas Dilger
116 Dave Martindale
117 Guy Eric Schalnat
118 Paul Schmidt
119 Tim Wegner
120
121The PNG Reference Library is supplied &#34;AS IS&#34;. The Contributing
122Authors and Group 42, Inc. disclaim all warranties, expressed or
123implied, including, without limitation, the warranties of
124merchantability and of fitness for any purpose. The Contributing
125Authors and Group 42, Inc. assume no liability for direct, indirect,
126incidental, special, exemplary, or consequential damages, which may
127result from the use of the PNG Reference Library, even if advised of
128the possibility of such damage.
129
130Permission is hereby granted to use, copy, modify, and distribute this
131source code, or portions hereof, for any purpose, without fee, subject
132to the following restrictions:
133
134 1. The origin of this source code must not be misrepresented.
135
136 2. Altered versions must be plainly marked as such and must not
137 be misrepresented as being the original source.
138
139 3. This Copyright notice may not be removed or altered from any
140 source or altered source distribution.
141
142The Contributing Authors and Group 42, Inc. specifically permit,
143without fee, and encourage the use of this source code as a component
144to supporting the PNG file format in commercial products. If you use
145this source code in a product, acknowledgment is not required but would
146be appreciated.
147
148TRADEMARK
149=========
150
151The name &#34;libpng&#34; has not been registered by the Copyright owners
152as a trademark in any jurisdiction. However, because libpng has
153been distributed and maintained world-wide, continually since 1995,
154the Copyright owners claim &#34;common-law trademark protection&#34; in any
155jurisdiction where common-law trademark is recognized.
156
157&lt;/pre&gt;
158
159### AUTHORS File Information
160```
161PNG REFERENCE LIBRARY AUTHORS
162=============================
163
164This is the list of PNG Reference Library (&#34;libpng&#34;) Contributing
165Authors, for copyright and licensing purposes.
166
167 * Adam Richter
168 * Andreas Dilger
169 * Chris Blume
170 * Cosmin Truta
171 * Dave Martindale
172 * Eric S. Raymond
173 * Gilles Vollant
174 * Glenn Randers-Pehrson
175 * Greg Roelofs
176 * Guy Eric Schalnat
177 * James Yu
178 * John Bowler
179 * Kevin Bracey
180 * Magnus Holmgren
181 * Mandar Sahastrabuddhe
182 * Mans Rullgard
183 * Matt Sarett
184 * Mike Klein
185 * Pascal Massimino
186 * Paul Schmidt
187 * Philippe Antoine
188 * Qiang Zhou
189 * Sam Bushell
190 * Samuel Williams
191 * Simon-Pierre Cadieux
192 * Tim Wegner
193 * Tom Lane
194 * Tom Tanner
195 * Vadim Barkov
196 * Willem van Schaik
197 * Zhijie Liang
198 * Apple Inc.
199 - Zixu Wang (王子旭)
200 * Arm Holdings
201 - Richard Townsend
202 * Google Inc.
203 - Dan Field
204 - Leon Scroggins III
205 - Matt Sarett
206 - Mike Klein
207 - Sami Boukortt
208 - Wan-Teh Chang
209 * Loongson Technology Corporation Ltd.
210 - GuXiWei (顾希伟)
211 - JinBo (金波)
212 - ZhangLixia (张利霞)
213
214The build projects, the build scripts, the test scripts, and other
215files in the &#34;projects&#34;, &#34;scripts&#34; and &#34;tests&#34; directories, have
216other copyright owners, but are released under the libpng license.
217
218Some files in the &#34;ci&#34; and &#34;contrib&#34; directories, as well as some
219of the tools-generated files that are distributed with libpng, have
220other copyright owners, and are released under other open source
221licenses.
222```
223
224## Files:
225arm/palette_neon_intrinsics.c
226
227/* palette_neon_intrinsics.c - NEON optimised palette expansion functions
228 *
229 * Copyright (c) 2018-2019 Cosmin Truta
230 * Copyright (c) 2017-2018 Arm Holdings. All rights reserved.
231 * Written by Richard Townsend &lt;[email protected]&gt;, February 2017.
232 *
233 * This code is released under the libpng license.
234 * For conditions of distribution and use, see the disclaimer
235 * and license in png.h
236 */
237
238## Files:
239contrib/gregbook/readpng.h
240
241/*---------------------------------------------------------------------------
242
243 rpng - simple PNG display program readpng.h
244
245 ---------------------------------------------------------------------------
246
247 Copyright (c) 1998-2007 Greg Roelofs. All rights reserved.
248
249 This software is provided &#34;as is,&#34; without warranty of any kind,
250 express or implied. In no event shall the author or contributors
251 be held liable for any damages arising in any way from the use of
252 this software.
253
254 The contents of this file are DUAL-LICENSED. You may modify and/or
255 redistribute this software according to the terms of one of the
256 following two licenses (at your option):
257
258
259 LICENSE 1 (&#34;BSD-like with advertising clause&#34;):
260
261 Permission is granted to anyone to use this software for any purpose,
262 including commercial applications, and to alter it and redistribute
263 it freely, subject to the following restrictions:
264
265 1. Redistributions of source code must retain the above copyright
266 notice, disclaimer, and this list of conditions.
267 2. Redistributions in binary form must reproduce the above copyright
268 notice, disclaimer, and this list of conditions in the documenta-
269 tion and/or other materials provided with the distribution.
270 3. All advertising materials mentioning features or use of this
271 software must display the following acknowledgment:
272
273 This product includes software developed by Greg Roelofs
274 and contributors for the book, &#34;PNG: The Definitive Guide,&#34;
275 published by O&#39;Reilly and Associates.
276
277
278 LICENSE 2 (GNU GPL v2 or later):
279
280 This program is free software; you can redistribute it and/or modify
281 it under the terms of the GNU General Public License as published by
282 the Free Software Foundation; either version 2 of the License, or
283 (at your option) any later version.
284
285 This program is distributed in the hope that it will be useful,
286 but WITHOUT ANY WARRANTY; without even the implied warranty of
287 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
288 GNU General Public License for more details.
289
290 You should have received a copy of the GNU General Public License
291 along with this program; if not, write to the Free Software Foundation,
292 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
293
294 ---------------------------------------------------------------------------*/
295
296## Files:
297contrib/pngminus/pnm2png.c
298
299/*
300 * pnm2png.c --- conversion from PBM/PGM/PPM-file to PNG-file
301 * copyright (C) 1999-2019 by Willem van Schaik &lt;willem at schaik dot com&gt;
302 *
303 * This software is released under the MIT license. For conditions of
304 * distribution and use, see the LICENSE file part of this package.
305 */
306
307## Files:
308png.h
309
310/*
311 * A &#34;png_get_copyright&#34; function is available, for convenient use in &#34;about&#34;
312 * boxes and the like:
313 *
314 * printf(&#34;%s&#34;, png_get_copyright(NULL));
315 *
316 * Also, the PNG logo (in PNG format, of course) is supplied in the
317 * files &#34;pngbar.png&#34; and &#34;pngbar.jpg (88x31) and &#34;pngnow.png&#34; (98x31).
318 */
319
320## Files:
321powerpc/powerpc_init.c
322
323/* powerpc_init.c - POWERPC optimised filter functions
324 *
325 * Copyright (c) 2018 Cosmin Truta
326 * Copyright (c) 2017 Glenn Randers-Pehrson
327 * Written by Vadim Barkov, 2017.
328 *
329 * This code is released under the libpng license.
330 * For conditions of distribution and use, see the disclaimer
331 * and license in png.h
332 */
333
334## Files:
335contrib/visupng/cexcept.h
336
337/*===
338cexcept.h 2.0.1 (2008-Jul-19-Sat)
339http://www.nicemice.net/cexcept/
340Adam M. Costello
341http://www.nicemice.net/amc/
342
343An interface for exception-handling in ANSI C (C89 and subsequent ISO
344standards), developed jointly with Cosmin Truta.
345
346 Copyright (c) 2000-2008 Adam M. Costello and Cosmin Truta.
347 This software may be modified only if its author and version
348 information is updated accurately, and may be redistributed
349 only if accompanied by this unaltered notice. Subject to those
350 restrictions, permission is granted to anyone to do anything
351 with this software. The copyright holders make no guarantees
352 regarding this software, and are not responsible for any damage
353 resulting from its use.
354
355The cexcept interface is not compatible with and cannot interact
356with system exceptions (like division by zero or memory segmentation
357violation), compiler-generated exceptions (like C++ exceptions), or
358other exception-handling interfaces.
359
360When using this interface across multiple .c files, do not include
361this header file directly. Instead, create a wrapper header file that
362includes this header file and then invokes the define_exception_type
363macro (see below). The .c files should then include that header file.
364
365The interface consists of one type, one well-known name, and six macros.
366
367
368define_exception_type(type_name);
369
370 This macro is used like an external declaration. It specifies
371 the type of object that gets copied from the exception thrower to
372 the exception catcher. The type_name can be any type that can be
373 assigned to, that is, a non-constant arithmetic type, struct, union,
374 or pointer. Examples:
375
376 define_exception_type(int);
377
378 enum exception { out_of_memory, bad_arguments, disk_full };
379 define_exception_type(enum exception);
380
381 struct exception { int code; const char *msg; };
382 define_exception_type(struct exception);
383
384 Because throwing an exception causes the object to be copied (not
385 just once, but twice), programmers may wish to consider size when
386 choosing the exception type.
387
388
389struct exception_context;
390
391 This type may be used after the define_exception_type() macro has
392 been invoked. A struct exception_context must be known to both
393 the thrower and the catcher. It is expected that there be one
394 context for each thread that uses exceptions. It would certainly
395 be dangerous for multiple threads to access the same context.
396 One thread can use multiple contexts, but that is likely to be
397 confusing and not typically useful. The application can allocate
398 this structure in any way it pleases--automatic, static, or dynamic.
399 The application programmer should pretend not to know the structure
400 members, which are subject to change.
401
402
403struct exception_context *the_exception_context;
404
405 The Try/Catch and Throw statements (described below) implicitly
406 refer to a context, using the name the_exception_context. It is
407 the application&#39;s responsibility to make sure that this name yields
408 the address of a mutable (non-constant) struct exception_context
409 wherever those statements are used. Subject to that constraint, the
410 application may declare a variable of this name anywhere it likes
411 (inside a function, in a parameter list, or externally), and may
412 use whatever storage class specifiers (static, extern, etc) or type
413 qualifiers (const, volatile, etc) it likes. Examples:
414
415 static struct exception_context
416 * const the_exception_context = &amp;foo;
417
418 { struct exception_context *the_exception_context = bar; ... }
419
420 int blah(struct exception_context *the_exception_context, ...);
421
422 extern struct exception_context the_exception_context[1];
423
424 The last example illustrates a trick that avoids creating a pointer
425 object separate from the structure object.
426
427 The name could even be a macro, for example:
428
429 struct exception_context ec_array[numthreads];
430 #define the_exception_context (ec_array + thread_id)
431
432 Be aware that the_exception_context is used several times by the
433 Try/Catch/Throw macros, so it shouldn&#39;t be expensive or have side
434 effects. The expansion must be a drop-in replacement for an
435 identifier, so it&#39;s safest to put parentheses around it.
436
437
438void init_exception_context(struct exception_context *ec);
439
440 For context structures allocated statically (by an external
441 definition or using the &#34;static&#34; keyword), the implicit
442 initialization to all zeros is sufficient, but contexts allocated
443 by other means must be initialized using this macro before they
444 are used by a Try/Catch statement. It does no harm to initialize
445 a context more than once (by using this macro on a statically
446 allocated context, or using this macro twice on the same context),
447 but a context must not be re-initialized after it has been used by a
448 Try/Catch statement.
449
450
451Try statement
452Catch (expression) statement
453
454 The Try/Catch/Throw macros are capitalized in order to avoid
455 confusion with the C++ keywords, which have subtly different
456 semantics.
457
458 A Try/Catch statement has a syntax similar to an if/else statement,
459 except that the parenthesized expression goes after the second
460 keyword rather than the first. As with if/else, there are two
461 clauses, each of which may be a simple statement ending with a
462 semicolon or a brace-enclosed compound statement. But whereas
463 the else clause is optional, the Catch clause is required. The
464 expression must be a modifiable lvalue (something capable of being
465 assigned to) of the same type (disregarding type qualifiers) that
466 was passed to define_exception_type().
467
468 If a Throw that uses the same exception context as the Try/Catch is
469 executed within the Try clause (typically within a function called
470 by the Try clause), and the exception is not caught by a nested
471 Try/Catch statement, then a copy of the exception will be assigned
472 to the expression, and control will jump to the Catch clause. If no
473 such Throw is executed, then the assignment is not performed, and
474 the Catch clause is not executed.
475
476 The expression is not evaluated unless and until the exception is
477 caught, which is significant if it has side effects, for example:
478
479 Try foo();
480 Catch (p[++i].e) { ... }
481
482 IMPORTANT: Jumping into or out of a Try clause (for example via
483 return, break, continue, goto, longjmp) is forbidden--the compiler
484 will not complain, but bad things will happen at run-time. Jumping
485 into or out of a Catch clause is okay, and so is jumping around
486 inside a Try clause. In many cases where one is tempted to return
487 from a Try clause, it will suffice to use Throw, and then return
488 from the Catch clause. Another option is to set a flag variable and
489 use goto to jump to the end of the Try clause, then check the flag
490 after the Try/Catch statement.
491
492 IMPORTANT: The values of any non-volatile automatic variables
493 changed within the Try clause are undefined after an exception is
494 caught. Therefore, variables modified inside the Try block whose
495 values are needed later outside the Try block must either use static
496 storage or be declared with the &#34;volatile&#34; type qualifier.
497
498
499Throw expression;
500
501 A Throw statement is very much like a return statement, except that
502 the expression is required. Whereas return jumps back to the place
503 where the current function was called, Throw jumps back to the Catch
504 clause of the innermost enclosing Try clause. The expression must
505 be compatible with the type passed to define_exception_type(). The
506 exception must be caught, otherwise the program may crash.
507
508 Slight limitation: If the expression is a comma-expression, it must
509 be enclosed in parentheses.
510
511
512Try statement
513Catch_anonymous statement
514
515 When the value of the exception is not needed, a Try/Catch statement
516 can use Catch_anonymous instead of Catch (expression).
517
518
519Everything below this point is for the benefit of the compiler. The
520application programmer should pretend not to know any of it, because it
521is subject to change.
522
523===*/
524
525## Files:
526contrib/tools/sRGB.h
527
528/*-
529 * sRGB.h
530 *
531 * Last changed in libpng 1.6.0 [February 14, 2013]
532 *
533 * COPYRIGHT: Written by John Cunningham Bowler, 2013.
534 * To the extent possible under law, the author has waived all copyright and
535 * related or neighboring rights to this work. This work is published from:
536 * United States.
537 *
538 * Utility file; not actually a header, this contains definitions of sRGB
539 * calculation functions for inclusion in those test programs that need them.
540 *
541 * All routines take and return a floating point value in the range
542 * 0 to 1.0, doing a calculation according to the sRGB specification
543 * (in fact the source of the numbers is the wikipedia article at
544 * https://en.wikipedia.org/wiki/SRGB).
545 */
546
547## Files:
548contrib/libtests/timepng.c
549
550/* timepng.c
551 *
552 * Copyright (c) 2013,2016 John Cunningham Bowler
553 *
554 * This code is released under the libpng license.
555 * For conditions of distribution and use, see the disclaimer
556 * and license in png.h
557 *
558 * Load an arbitrary number of PNG files (from the command line, or, if there
559 * are no arguments on the command line, from stdin) then run a time test by
560 * reading each file by row or by image (possibly with transforms in the latter
561 * case). The only output is a time as a floating point number of seconds with
562 * 9 decimal digits.
563 */
564
565## Files:
566example.c
567
568/* example.c - an example of using libpng
569 *
570 * Maintained 2018 Cosmin Truta
571 * Maintained 1998-2016 Glenn Randers-Pehrson
572 * Maintained 1996-1997 Andreas Dilger
573 * Written 1995-1996 Guy Eric Schalnat, Group 42, Inc.
574 *
575 * To the extent possible under law, the authors have waived
576 * all copyright and related or neighboring rights to this file.
577 * This work is published from: United States, Canada.
578 */
579
580## Files:
581intel/filter_sse2_intrinsics.c
582
583/* filter_sse2_intrinsics.c - SSE2 optimized filter functions
584 *
585 * Copyright (c) 2018 Cosmin Truta
586 * Copyright (c) 2016-2017 Glenn Randers-Pehrson
587 * Written by Mike Klein and Matt Sarett
588 * Derived from arm/filter_neon_intrinsics.c
589 *
590 * This code is released under the libpng license.
591 * For conditions of distribution and use, see the disclaimer
592 * and license in png.h
593 */
594
595## Files:
596contrib/libtests/makepng.c
597
598/* Max out the text compression level in an attempt to make the license
599 * small. If --small then do the same for the IDAT.
600 */
601
602## Files:
603powerpc/filter_vsx_intrinsics.c
604
605/* filter_vsx_intrinsics.c - PowerPC optimised filter functions
606 *
607 * Copyright (c) 2018 Cosmin Truta
608 * Copyright (c) 2017 Glenn Randers-Pehrson
609 * Written by Vadim Barkov, 2017.
610 *
611 * This code is released under the libpng license.
612 * For conditions of distribution and use, see the disclaimer
613 * and license in png.h
614 */
615
616## Files:
617contrib/examples/iccfrompng.c
618
619/*- iccfrompng
620 *
621 * COPYRIGHT: Written by John Cunningham Bowler, 2011.
622 * To the extent possible under law, the author has waived all copyright and
623 * related or neighboring rights to this work. This work is published from:
624 * United States.
625 *
626 * Extract any icc profiles found in the given PNG files. This is a simple
627 * example of a program that extracts information from the header of a PNG file
628 * without processing the image. Notice that some header information may occur
629 * after the image data. Textual data and comments are an example; the approach
630 * in this file won&#39;t work reliably for such data because it only looks for the
631 * information in the section of the file that precedes the image data.
632 *
633 * Compile and link against libpng and zlib, plus anything else required on the
634 * system you use.
635 *
636 * To use supply a list of PNG files containing iCCP chunks, the chunks will be
637 * extracted to a similarly named file with the extension replaced by &#39;icc&#39;,
638 * which will be overwritten without warning.
639 */
640
641## Files:
642contrib/examples/pngpixel.c
643
644/*- pngpixel
645 *
646 * COPYRIGHT: Written by John Cunningham Bowler, 2011.
647 * To the extent possible under law, the author has waived all copyright and
648 * related or neighboring rights to this work. This work is published from:
649 * United States.
650 *
651 * Read a single pixel value from a PNG file.
652 *
653 * This code illustrates basic &#39;by-row&#39; reading of a PNG file using libpng.
654 * Rows are read until a particular pixel is found; the value of this pixel is
655 * then printed on stdout.
656 *
657 * The code illustrates how to do this on interlaced as well as non-interlaced
658 * images. Normally you would call png_set_interlace_handling() to have libpng
659 * deal with the interlace for you, but that obliges you to buffer half of the
660 * image to assemble the interlaced rows. In this code
661 * png_set_interlace_handling() is not called and, instead, the code handles the
662 * interlace passes directly looking for the required pixel.
663 */
664
665## Files:
666contrib/gregbook/readppm.c
667
668/*---------------------------------------------------------------------------
669
670 rpng - simple PNG display program readppm.c
671
672 ---------------------------------------------------------------------------
673
674 This is a special-purpose replacement for readpng.c that allows binary
675 PPM files to be used in place of PNG images.
676
677 ---------------------------------------------------------------------------
678
679 Copyright (c) 1998-2007,2017 Greg Roelofs. All rights reserved.
680
681 This software is provided &#34;as is,&#34; without warranty of any kind,
682 express or implied. In no event shall the author or contributors
683 be held liable for any damages arising in any way from the use of
684 this software.
685
686 The contents of this file are DUAL-LICENSED. You may modify and/or
687 redistribute this software according to the terms of one of the
688 following two licenses (at your option):
689
690
691 LICENSE 1 (&#34;BSD-like with advertising clause&#34;):
692
693 Permission is granted to anyone to use this software for any purpose,
694 including commercial applications, and to alter it and redistribute
695 it freely, subject to the following restrictions:
696
697 1. Redistributions of source code must retain the above copyright
698 notice, disclaimer, and this list of conditions.
699 2. Redistributions in binary form must reproduce the above copyright
700 notice, disclaimer, and this list of conditions in the documenta-
701 tion and/or other materials provided with the distribution.
702 3. All advertising materials mentioning features or use of this
703 software must display the following acknowledgment:
704
705 This product includes software developed by Greg Roelofs
706 and contributors for the book, &#34;PNG: The Definitive Guide,&#34;
707 published by O&#39;Reilly and Associates.
708
709
710 LICENSE 2 (GNU GPL v2 or later):
711
712 This program is free software; you can redistribute it and/or modify
713 it under the terms of the GNU General Public License as published by
714 the Free Software Foundation; either version 2 of the License, or
715 (at your option) any later version.
716
717 This program is distributed in the hope that it will be useful,
718 but WITHOUT ANY WARRANTY; without even the implied warranty of
719 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
720 GNU General Public License for more details.
721
722 You should have received a copy of the GNU General Public License
723 along with this program; if not, write to the Free Software Foundation,
724 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
725
726 ---------------------------------------------------------------------------*/
727
728## Files:
729pngrutil.c
730
731/* pngrutil.c - utilities to read a PNG file
732 *
733 * Copyright (c) 2018-2022 Cosmin Truta
734 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
735 * Copyright (c) 1996-1997 Andreas Dilger
736 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
737 *
738 * This code is released under the libpng license.
739 * For conditions of distribution and use, see the disclaimer
740 * and license in png.h
741 *
742 * This file contains routines that are only called from within
743 * libpng itself during the course of reading an image.
744 */
745
746## Files:
747contrib/libtests/makepng.c
748
749/*
750 * This code is released under the libpng license.
751 * For conditions of distribution and use, see the disclaimer
752 * and license in png.h
753 *
754 * Make a test PNG image. The arguments are as follows:
755 *
756 * makepng [--sRGB|--linear|--1.8] [--tRNS] [--nofilters] \
757 * color-type bit-depth [file-name]
758 *
759 * The color-type may be numeric (and must match the numbers used by the PNG
760 * specification) or one of the format names listed below. The bit-depth is the
761 * component bit depth, or the pixel bit-depth for a color-mapped image.
762 *
763 * Without any options no color-space information is written, with the options
764 * an sRGB or the appropriate gAMA chunk is written. &#34;1.8&#34; refers to the
765 * display system used on older Apple computers to correct for high ambient
766 * light levels in the viewing environment; it applies a transform of
767 * approximately value^(1/1.45) to the color values and so a gAMA chunk of 65909
768 * is written (1.45/2.2).
769 *
770 * The image data is generated internally. Unless --color is given the images
771 * used are as follows:
772 *
773 * 1 channel: a square image with a diamond, the least luminous colors are on
774 * the edge of the image, the most luminous in the center.
775 *
776 * 2 channels: the color channel increases in luminosity from top to bottom, the
777 * alpha channel increases in opacity from left to right.
778 *
779 * 3 channels: linear combinations of, from the top-left corner clockwise,
780 * black, green, white, red.
781 *
782 * 4 channels: linear combinations of, from the top-left corner clockwise,
783 * transparent, red, green, blue.
784 *
785 * For color-mapped images a four channel color-map is used and if --tRNS is
786 * given the PNG file has a tRNS chunk, as follows:
787 *
788 * 1-bit: entry 0 is transparent-red, entry 1 is opaque-white
789 * 2-bit: entry 0: transparent-green
790 * entry 1: 40%-red
791 * entry 2: 80%-blue
792 * entry 3: opaque-white
793 * 4-bit: the 16 combinations of the 2-bit case
794 * 8-bit: the 256 combinations of the 4-bit case
795 *
796 * The palette always has 2^bit-depth entries and the tRNS chunk one fewer. The
797 * image is the 1-channel diamond, but using palette index, not luminosity.
798 *
799 * For formats other than color-mapped ones if --tRNS is specified a tRNS chunk
800 * is generated with all channels equal to the low bits of 0x0101.
801 *
802 * Image size is determined by the final pixel depth in bits, i.e. channels x
803 * bit-depth, as follows:
804 *
805 * 8 bits or less: 64x64
806 * 16 bits: 256x256
807 * More than 16 bits: 1024x1024
808 *
809 * Row filtering is the libpng default but may be turned off (the &#39;none&#39; filter
810 * is used on every row) with the --nofilters option.
811 *
812 * The images are not interlaced.
813 *
814 * If file-name is given then the PNG is written to that file, else it is
815 * written to stdout. Notice that stdout is not supported on systems where, by
816 * default, it assumes text output; this program makes no attempt to change the
817 * text mode of stdout!
818 *
819 * makepng --color=&lt;color&gt; ...
820 *
821 * If --color is given then the whole image has that color, color-mapped images
822 * will have exactly one palette entry and all image files with be 16x16 in
823 * size. The color value is 1 to 4 decimal numbers as appropriate for the color
824 * type.
825 *
826 * makepng --small ...
827 *
828 * If --small is given the images are no larger than required to include every
829 * possible pixel value for the format.
830 *
831 * For formats with pixels 8 bits or fewer in size the images consist of a
832 * single row with 2^pixel-depth pixels, one of every possible value.
833 *
834 * For formats with 16-bit pixels a 256x256 image is generated containing every
835 * possible pixel value.
836 *
837 * For larger pixel sizes a 256x256 image is generated where the first row
838 * consists of each pixel that has identical byte values throughout the pixel
839 * followed by rows where the byte values differ within the pixel.
840 *
841 * In all cases the pixel values are arranged in such a way that the SUB and UP
842 * filters give byte sequences for maximal zlib compression. By default (if
843 * --nofilters is not given) the SUB filter is used on the first row and the UP
844 * filter on all following rows.
845 *
846 * The --small option is meant to provide good test-case coverage, however the
847 * images are not easy to examine visually. Without the --small option the
848 * images contain identical color values; the pixel values are adjusted
849 * according to the gamma encoding with no gamma encoding being interpreted as
850 * sRGB.
851 *
852 * LICENSING
853 * =========
854 *
855 * This code is copyright of the authors, see the COPYRIGHT define above. The
856 * code is licensed as above, using the libpng license. The code generates
857 * images which are solely the product of the code; the options choose which of
858 * the many possibilities to generate. The images that result (but not the code
859 * which generates them) are licensed as defined here:
860 *
861 * IMPORTANT: the COPYRIGHT #define must contain ISO-Latin-1 characters, the
862 * IMAGE_LICENSING #define must contain UTF-8 characters. The &#39;copyright&#39;
863 * symbol 0xA9U (\251) in ISO-Latin-1 encoding and 0xC20xA9 (\302\251) in UTF-8.
864 */
865
866## Files:
867contrib/powerpc-vsx/linux.c
868
869/* contrib/powerpc-vsx/linux.c
870 *
871 * Copyright (c) 2017 Glenn Randers-Pehrson
872 * Written by Vadim Barkov, 2017.
873 * Last changed in libpng 1.6.29 [March 16, 2017]
874 *
875 * This code is released under the libpng license.
876 * For conditions of distribution and use, see the disclaimer
877 * and license in png.h
878 *
879 * STATUS: TESTED
880 * BUG REPORTS: [email protected]
881 *
882 * png_have_vsx implemented for Linux by reading the widely available
883 * pseudo-file /proc/cpuinfo.
884 *
885 * This code is strict ANSI-C and is probably moderately portable; it does
886 * however use &lt;stdio.h&gt; and it assumes that /proc/cpuinfo is never localized.
887 */
888
889## Files:
890pngerror.c
891
892/* pngerror.c - stub functions for i/o and memory allocation
893 *
894 * Copyright (c) 2018 Cosmin Truta
895 * Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
896 * Copyright (c) 1996-1997 Andreas Dilger
897 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
898 *
899 * This code is released under the libpng license.
900 * For conditions of distribution and use, see the disclaimer
901 * and license in png.h
902 *
903 * This file provides a location for all error handling. Users who
904 * need special error handling are expected to write replacement functions
905 * and use png_set_error_fn() to use those functions. See the instructions
906 * at each function.
907 */
908
909## Files:
910contrib/pngminim/decoder/pngusr.h
911
912/* minrdpngconf.h: headers to make a minimal png-read-only library
913 *
914 * Copyright (c) 2007, 2010-2013 Glenn Randers-Pehrson
915 *
916 * This code is released under the libpng license.
917 * For conditions of distribution and use, see the disclaimer
918 * and license in png.h
919 *
920 * Derived from pngcrush.h, Copyright 1998-2007, Glenn Randers-Pehrson
921 */
922
923## Files:
924contrib/libtests/pngunknown.c
925
926/* pngunknown.c - test the read side unknown chunk handling
927 *
928 * Copyright (c) 2021 Cosmin Truta
929 * Copyright (c) 2015,2017 Glenn Randers-Pehrson
930 * Written by John Cunningham Bowler
931 *
932 * This code is released under the libpng license.
933 * For conditions of distribution and use, see the disclaimer
934 * and license in png.h
935 *
936 * NOTES:
937 * This is a C program that is intended to be linked against libpng. It
938 * allows the libpng unknown handling code to be tested by interpreting
939 * arguments to save or discard combinations of chunks. The program is
940 * currently just a minimal validation for the built-in libpng facilities.
941 */
942
943## Files:
944pngwtran.c
945
946/* pngwtran.c - transforms the data in a row for PNG writers
947 *
948 * Copyright (c) 2018 Cosmin Truta
949 * Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
950 * Copyright (c) 1996-1997 Andreas Dilger
951 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
952 *
953 * This code is released under the libpng license.
954 * For conditions of distribution and use, see the disclaimer
955 * and license in png.h
956 */
957
958## Files:
959ci/ci_cmake.sh
960
961# ci_cmake.sh
962# Continuously integrate libpng using CMake.
963#
964# Copyright (c) 2019-2022 Cosmin Truta.
965#
966# This software is released under the libpng license.
967# For conditions of distribution and use, see the disclaimer
968# and license in png.h.
969
970## Files:
971contrib/pngminim/encoder/pngusr.h
972
973/* minwrpngconf.h: headers to make a minimal png-write-only library
974 *
975 * Copyright (c) 2007, 2010-2013 Glenn Randers-Pehrson
976 *
977 * This code is released under the libpng license.
978 * For conditions of distribution and use, see the disclaimer
979 * and license in png.h
980 *
981 * Derived from pngcrush.h, Copyright 1998-2007, Glenn Randers-Pehrson
982 */
983
984## Files:
985contrib/pngminus/png2pnm.c
986
987/*
988 * png2pnm.c --- conversion from PNG-file to PGM/PPM-file
989 * copyright (C) 1999-2019 by Willem van Schaik &lt;willem at schaik dot com&gt;
990 *
991 * This software is released under the MIT license. For conditions of
992 * distribution and use, see the LICENSE file part of this package.
993 */
994
995## Files:
996pngconf.h
997
998/* pngconf.h - machine-configurable file for libpng
999 *
1000 * libpng version 1.6.38
1001 *
1002 * Copyright (c) 2018-2022 Cosmin Truta
1003 * Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
1004 * Copyright (c) 1996-1997 Andreas Dilger
1005 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
1006 *
1007 * This code is released under the libpng license.
1008 * For conditions of distribution and use, see the disclaimer
1009 * and license in png.h
1010 *
1011 * Any machine specific code is near the front of this file, so if you
1012 * are configuring libpng for a machine, you may want to read the section
1013 * starting here down to where it starts to typedef png_color, png_text,
1014 * and png_info.
1015 */
1016
1017## Files:
1018contrib/arm-neon/linux-auxv.c
1019
1020/* contrib/arm-neon/linux-auxv.c
1021 *
1022 * Copyright (c) 2014 Glenn Randers-Pehrson
1023 * Written by Mans Rullgard, 2011.
1024 * Last changed in libpng 1.6.10 [March 6, 2014]
1025 *
1026 * This code is released under the libpng license.
1027 * For conditions of distribution and use, see the disclaimer
1028 * and license in png.h
1029 *
1030 * SEE contrib/arm-neon/README before reporting bugs
1031 *
1032 * STATUS: COMPILED, TESTED
1033 * BUG REPORTS: [email protected]
1034 *
1035 * png_have_neon implemented for Linux versions which allow access to
1036 * /proc/self/auxv. This is probably faster, cleaner and safer than the code to
1037 * read /proc/cpuinfo in contrib/arm-neon/linux, however it is yet another piece
1038 * of potentially untested code and has more complex dependencies than the code
1039 * to read cpuinfo.
1040 *
1041 * This generic __linux__ implementation requires reading /proc/self/auxv and
1042 * looking at each element for one that records NEON capabilities.
1043 */
1044
1045## Files:
1046contrib/gregbook/rpng2-win.c
1047
1048/*---------------------------------------------------------------------------
1049
1050 rpng2 - progressive-model PNG display program rpng2-win.c
1051
1052 This program decodes and displays PNG files progressively, as if it were
1053 a web browser (though the front end is only set up to read from files).
1054 It supports gamma correction, user-specified background colors, and user-
1055 specified background patterns (for transparent images). This version is
1056 for 32-bit Windows; it may compile under 16-bit Windows with a little
1057 tweaking (or maybe not). Thanks to Adam Costello and Pieter S. van der
1058 Meulen for the &#34;diamond&#34; and &#34;radial waves&#34; patterns, respectively.
1059
1060 to do (someday, maybe):
1061 - handle quoted command-line args (especially filenames with spaces)
1062 - finish resizable checkerboard-gradient (sizes 4-128?)
1063 - use %.1023s to simplify truncation of title-bar string?
1064 - have minimum window width: oh well
1065
1066 ---------------------------------------------------------------------------
1067
1068 Changelog:
1069 - 1.01: initial public release
1070 - 1.02: fixed cut-and-paste error in usage screen (oops...)
1071 - 1.03: modified to allow abbreviated options
1072 - 1.04: removed bogus extra argument from usage fprintf() [Glenn R-P?];
1073 fixed command-line parsing bug
1074 - 1.10: enabled &#34;message window&#34;/console (thanks to David Geldreich)
1075 - 1.20: added runtime MMX-enabling/disabling and new -mmx* options
1076 - 1.21: made minor tweak to usage screen to fit within 25-line console
1077 - 1.22: added AMD64/EM64T support (__x86_64__)
1078 - 2.00: dual-licensed (added GNU GPL)
1079 - 2.01: fixed 64-bit typo in readpng2.c
1080 - 2.02: fixed improper display of usage screen on PNG error(s); fixed
1081 unexpected-EOF and file-read-error cases
1082 - 2.03: removed runtime MMX-enabling/disabling and obsolete -mmx* options
1083 - 2.04: check for integer overflow (Glenn R-P)
1084
1085 ---------------------------------------------------------------------------
1086
1087 Copyright (c) 1998-2008, 2017 Greg Roelofs. All rights reserved.
1088
1089 This software is provided &#34;as is,&#34; without warranty of any kind,
1090 express or implied. In no event shall the author or contributors
1091 be held liable for any damages arising in any way from the use of
1092 this software.
1093
1094 The contents of this file are DUAL-LICENSED. You may modify and/or
1095 redistribute this software according to the terms of one of the
1096 following two licenses (at your option):
1097
1098
1099 LICENSE 1 (&#34;BSD-like with advertising clause&#34;):
1100
1101 Permission is granted to anyone to use this software for any purpose,
1102 including commercial applications, and to alter it and redistribute
1103 it freely, subject to the following restrictions:
1104
1105 1. Redistributions of source code must retain the above copyright
1106 notice, disclaimer, and this list of conditions.
1107 2. Redistributions in binary form must reproduce the above copyright
1108 notice, disclaimer, and this list of conditions in the documenta-
1109 tion and/or other materials provided with the distribution.
1110 3. All advertising materials mentioning features or use of this
1111 software must display the following acknowledgment:
1112
1113 This product includes software developed by Greg Roelofs
1114 and contributors for the book, &#34;PNG: The Definitive Guide,&#34;
1115 published by O&#39;Reilly and Associates.
1116
1117
1118 LICENSE 2 (GNU GPL v2 or later):
1119
1120 This program is free software; you can redistribute it and/or modify
1121 it under the terms of the GNU General Public License as published by
1122 the Free Software Foundation; either version 2 of the License, or
1123 (at your option) any later version.
1124
1125 This program is distributed in the hope that it will be useful,
1126 but WITHOUT ANY WARRANTY; without even the implied warranty of
1127 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1128 GNU General Public License for more details.
1129
1130 You should have received a copy of the GNU General Public License
1131 along with this program; if not, write to the Free Software Foundation,
1132 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1133
1134 ---------------------------------------------------------------------------*/
1135
1136## Files:
1137contrib/libtests/pngstest-errors.h
1138
1139/* contrib/libtests/pngstest-errors.h
1140 *
1141 * BUILT USING: libpng version 1.6.19beta03 - September 25, 2015
1142 *
1143 * This code is released under the libpng license.
1144 * For conditions of distribution and use, see the disclaimer
1145 * and license in png.h
1146 *
1147 * THIS IS A MACHINE GENERATED FILE: do not edit it directly!
1148 * Instead run:
1149 *
1150 * pngstest --accumulate
1151 *
1152 * on as many PNG files as possible; at least PNGSuite and
1153 * contrib/libtests/testpngs.
1154 */
1155
1156## Files:
1157pngmem.c
1158
1159/* pngmem.c - stub functions for memory allocation
1160 *
1161 * Copyright (c) 2018 Cosmin Truta
1162 * Copyright (c) 1998-2002,2004,2006-2014,2016 Glenn Randers-Pehrson
1163 * Copyright (c) 1996-1997 Andreas Dilger
1164 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
1165 *
1166 * This code is released under the libpng license.
1167 * For conditions of distribution and use, see the disclaimer
1168 * and license in png.h
1169 *
1170 * This file provides a location for all memory allocation. Users who
1171 * need special memory handling are expected to supply replacement
1172 * functions for png_malloc() and png_free(), and to use
1173 * png_create_read_struct_2() and png_create_write_struct_2() to
1174 * identify the replacement functions.
1175 */
1176
1177## Files:
1178ltmain.sh
1179
1180# This file is a library for parsing options in your shell scripts along
1181# with assorted other useful supporting features that you can make use
1182# of too.
1183#
1184# For the simplest scripts you might need only:
1185#
1186# #!/bin/sh
1187# . relative/path/to/funclib.sh
1188# . relative/path/to/options-parser
1189# scriptversion=1.0
1190# func_options ${1+&#34;$@&#34;}
1191# eval set dummy &#34;$func_options_result&#34;; shift
1192# ...rest of your script...
1193#
1194# In order for the &#39;--version&#39; option to work, you will need to have a
1195# suitably formatted comment like the one at the top of this file
1196# starting with &#39;# Written by &#39; and ending with &#39;# Copyright&#39;.
1197#
1198# For &#39;-h&#39; and &#39;--help&#39; to work, you will also need a one line
1199# description of your script&#39;s purpose in a comment directly above the
1200# &#39;# Written by &#39; line, like the one at the top of this file.
1201#
1202# The default options also support &#39;--debug&#39;, which will turn on shell
1203# execution tracing (see the comment above debug_cmd below for another
1204# use), and &#39;--verbose&#39; and the func_verbose function to allow your script
1205# to display verbose messages only when your user has specified
1206# &#39;--verbose&#39;.
1207#
1208# After sourcing this file, you can plug in processing for additional
1209# options by amending the variables from the &#39;Configuration&#39; section
1210# below, and following the instructions in the &#39;Option parsing&#39;
1211# section further down.
1212
1213## Files:
1214pngrio.c
1215
1216/* pngrio.c - functions for data input
1217 *
1218 * Copyright (c) 2018 Cosmin Truta
1219 * Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
1220 * Copyright (c) 1996-1997 Andreas Dilger
1221 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
1222 *
1223 * This code is released under the libpng license.
1224 * For conditions of distribution and use, see the disclaimer
1225 * and license in png.h
1226 *
1227 * This file provides a location for all input. Users who need
1228 * special handling are expected to write a function that has the same
1229 * arguments as this and performs a similar function, but that possibly
1230 * has a different input method. Note that you shouldn&#39;t change this
1231 * function, but rather write a replacement function and then make
1232 * libpng use it at run time with png_set_read_fn(...).
1233 */
1234
1235## Files:
1236png.h
1237
1238/* png.h - header file for PNG reference library
1239 *
1240 * libpng version 1.6.38 - September 14, 2022
1241 *
1242 * Copyright (c) 2018-2022 Cosmin Truta
1243 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
1244 * Copyright (c) 1996-1997 Andreas Dilger
1245 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
1246 *
1247 * This code is released under the libpng license. (See LICENSE, below.)
1248 *
1249 * Authors and maintainers:
1250 * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
1251 * libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
1252 * libpng versions 0.97, January 1998, through 1.6.35, July 2018:
1253 * Glenn Randers-Pehrson
1254 * libpng versions 1.6.36, December 2018, through 1.6.38, September 2022:
1255 * Cosmin Truta
1256 * See also &#34;Contributing Authors&#34;, below.
1257 */
1258
1259## Files:
1260ltmain.sh
1261
1262# GNU Libtool is free software; you can redistribute it and/or modify
1263# it under the terms of the GNU General Public License as published by
1264# the Free Software Foundation; either version 2 of the License, or
1265# (at your option) any later version.
1266#
1267# As a special exception to the GNU General Public License,
1268# if you distribute this file as part of a program or library that
1269# is built using GNU Libtool, you may include this file under the
1270# same distribution terms that you use for the rest of that program.
1271#
1272# GNU Libtool is distributed in the hope that it will be useful, but
1273# WITHOUT ANY WARRANTY; without even the implied warranty of
1274# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1275# General Public License for more details.
1276#
1277# You should have received a copy of the GNU General Public License
1278# along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
1279
1280## Files:
1281arm/arm_init.c
1282
1283/* arm_init.c - NEON optimised filter functions
1284 *
1285 * Copyright (c) 2018-2022 Cosmin Truta
1286 * Copyright (c) 2014,2016 Glenn Randers-Pehrson
1287 * Written by Mans Rullgard, 2011.
1288 *
1289 * This code is released under the libpng license.
1290 * For conditions of distribution and use, see the disclaimer
1291 * and license in png.h
1292 */
1293
1294## Files:
1295contrib/libtests/makepng.c
1296
1297/* Insert standard copyright and licence text. */
1298
1299## Files:
1300contrib/oss-fuzz/build.sh
1301
1302#!/bin/bash -eu
1303# Copyright 2017-2018 Glenn Randers-Pehrson
1304# Copyright 2016 Google Inc.
1305#
1306# Licensed under the Apache License, Version 2.0 (the &#34;License&#34;);
1307# you may not use this file except in compliance with the License.
1308# You may obtain a copy of the License at
1309#
1310# http://www.apache.org/licenses/LICENSE-2.0
1311#
1312# Unless required by applicable law or agreed to in writing, software
1313# distributed under the License is distributed on an &#34;AS IS&#34; BASIS,
1314# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1315# See the License for the specific language governing permissions and
1316# limitations under the License.
1317#
1318# Last changed in libpng 1.6.35 [July 15, 2018]
1319#
1320# Revisions by Glenn Randers-Pehrson, 2017:
1321# 1. Build only the library, not the tools (changed &#34;make -j$(nproc) all&#34; to
1322# &#34;make -j$(nproc) libpng16.la&#34;).
1323# 2. Disabled WARNING and WRITE options in pnglibconf.dfa.
1324# 3. Build zlib alongside libpng
1325################################################################################
1326
1327## Files:
1328example.c
1329
1330/* This is an example of how to use libpng to read and write PNG files.
1331 * The file libpng-manual.txt is much more verbose then this. If you have
1332 * not read it, do so first. This was designed to be a starting point of an
1333 * implementation. This is not officially part of libpng, is hereby placed
1334 * in the public domain, and therefore does not require a copyright notice.
1335 *
1336 * This file does not currently compile, because it is missing certain
1337 * parts, like allocating memory to hold an image. You will have to
1338 * supply these parts to get it to compile. For an example of a minimal
1339 * working PNG reader/writer, see pngtest.c, included in this distribution;
1340 * see also the programs in the contrib directory.
1341 */
1342
1343## Files:
1344contrib/libtests/gentests.sh
1345
1346#!/bin/sh
1347#
1348# Copyright (c) 2013 John Cunningham Bowler
1349#
1350# This code is released under the libpng license.
1351# For conditions of distribution and use, see the disclaimer
1352# and license in png.h
1353#
1354# Generate a set of PNG test images. The images are generated in a
1355# sub-directory called &#39;tests&#39; by default, however a command line argument will
1356# change that name. The generation requires a built version of makepng in the
1357# current directory.
1358#
1359
1360## Files:
1361arm/filter_neon_intrinsics.c
1362
1363/* filter_neon_intrinsics.c - NEON optimised filter functions
1364 *
1365 * Copyright (c) 2018 Cosmin Truta
1366 * Copyright (c) 2014,2016 Glenn Randers-Pehrson
1367 * Written by James Yu &lt;james.yu at linaro.org&gt;, October 2013.
1368 * Based on filter_neon.S, written by Mans Rullgard, 2011.
1369 *
1370 * This code is released under the libpng license.
1371 * For conditions of distribution and use, see the disclaimer
1372 * and license in png.h
1373 */
1374
1375## Files:
1376scripts/symbols.c
1377
1378/* symbols.c - find all exported symbols
1379 *
1380 * Last changed in libpng version 1.6.16 [December 22, 2014]
1381 * Copyright (c) 2011-2014 Glenn Randers-Pehrson
1382 *
1383 * This code is released under the libpng license.
1384 * For conditions of distribution and use, see the disclaimer
1385 * and license in png.h
1386 */
1387
1388## Files:
1389contrib/libtests/makepng.c
1390
1391/* These are used to insert Copyright and Licence fields, they allow the text to
1392 * have \n unlike the --insert option.
1393 */
1394
1395## Files:
1396contrib/powerpc-vsx/linux_aux.c
1397
1398/* contrib/powerpc-vsx/linux_aux.c
1399 *
1400 * Copyright (c) 2017 Glenn Randers-Pehrson
1401 * Written by Vadim Barkov, 2017.
1402 * Last changed in libpng 1.6.29 [March 16, 2017]
1403 *
1404 * This code is released under the libpng license.
1405 * For conditions of distribution and use, see the disclaimer
1406 * and license in png.h
1407 *
1408 * STATUS: TESTED
1409 * BUG REPORTS: [email protected]
1410 *
1411 * png_have_vsx implemented for Linux by using the auxiliary vector mechanism.
1412 *
1413 * This code is strict ANSI-C and is probably moderately portable; it does
1414 * however use &lt;stdio.h&gt; and it assumes that /proc/cpuinfo is never localized.
1415 */
1416
1417## Files:
1418contrib/visupng/PngFile.c
1419
1420/*-------------------------------------
1421 * PNGFILE.C -- Image File Functions
1422 *-------------------------------------
1423 *
1424 * Copyright 2000,2017 Willem van Schaik.
1425 *
1426 * This code is released under the libpng license.
1427 * For conditions of distribution and use, see the disclaimer
1428 * and license in png.h
1429 */
1430
1431## Files:
1432pngwutil.c
1433
1434/* pngwutil.c - utilities to write a PNG file
1435 *
1436 * Copyright (c) 2018 Cosmin Truta
1437 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
1438 * Copyright (c) 1996-1997 Andreas Dilger
1439 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
1440 *
1441 * This code is released under the libpng license.
1442 * For conditions of distribution and use, see the disclaimer
1443 * and license in png.h
1444 */
1445
1446## Files:
1447pngread.c
1448
1449/* pngread.c - read a PNG file
1450 *
1451 * Copyright (c) 2018-2019 Cosmin Truta
1452 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
1453 * Copyright (c) 1996-1997 Andreas Dilger
1454 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
1455 *
1456 * This code is released under the libpng license.
1457 * For conditions of distribution and use, see the disclaimer
1458 * and license in png.h
1459 *
1460 * This file contains routines that an application calls directly to
1461 * read a PNG file or stream.
1462 */
1463
1464## Files:
1465contrib/gregbook/readpng.c
1466
1467/*---------------------------------------------------------------------------
1468
1469 rpng - simple PNG display program readpng.c
1470
1471 ---------------------------------------------------------------------------
1472
1473 Copyright (c) 1998-2007,2017 Greg Roelofs. All rights reserved.
1474
1475 This software is provided &#34;as is,&#34; without warranty of any kind,
1476 express or implied. In no event shall the author or contributors
1477 be held liable for any damages arising in any way from the use of
1478 this software.
1479
1480 The contents of this file are DUAL-LICENSED. You may modify and/or
1481 redistribute this software according to the terms of one of the
1482 following two licenses (at your option):
1483
1484
1485 LICENSE 1 (&#34;BSD-like with advertising clause&#34;):
1486
1487 Permission is granted to anyone to use this software for any purpose,
1488 including commercial applications, and to alter it and redistribute
1489 it freely, subject to the following restrictions:
1490
1491 1. Redistributions of source code must retain the above copyright
1492 notice, disclaimer, and this list of conditions.
1493 2. Redistributions in binary form must reproduce the above copyright
1494 notice, disclaimer, and this list of conditions in the documenta-
1495 tion and/or other materials provided with the distribution.
1496 3. All advertising materials mentioning features or use of this
1497 software must display the following acknowledgment:
1498
1499 This product includes software developed by Greg Roelofs
1500 and contributors for the book, &#34;PNG: The Definitive Guide,&#34;
1501 published by O&#39;Reilly and Associates.
1502
1503
1504 LICENSE 2 (GNU GPL v2 or later):
1505
1506 This program is free software; you can redistribute it and/or modify
1507 it under the terms of the GNU General Public License as published by
1508 the Free Software Foundation; either version 2 of the License, or
1509 (at your option) any later version.
1510
1511 This program is distributed in the hope that it will be useful,
1512 but WITHOUT ANY WARRANTY; without even the implied warranty of
1513 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1514 GNU General Public License for more details.
1515
1516 You should have received a copy of the GNU General Public License
1517 along with this program; if not, write to the Free Software Foundation,
1518 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1519
1520 ---------------------------------------------------------------------------*/
1521
1522## Files:
1523mips/mips_init.c
1524
1525/* mips_init.c - MSA optimised filter functions
1526 *
1527 * Copyright (c) 2018 Cosmin Truta
1528 * Copyright (c) 2016 Glenn Randers-Pehrson
1529 * Written by Mandar Sahastrabuddhe, 2016.
1530 *
1531 * This code is released under the libpng license.
1532 * For conditions of distribution and use, see the disclaimer
1533 * and license in png.h
1534 */
1535
1536## Files:
1537ltmain.sh
1538
1539# Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc.
1540# This is free software; see the source for copying conditions. There is NO
1541# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1542
1543## Files:
1544contrib/mips-msa/linux.c
1545
1546/* contrib/mips-msa/linux.c
1547 *
1548 * Copyright (c) 2020 Cosmin Truta
1549 * Copyright (c) 2016 Glenn Randers-Pehrson
1550 * Written by Mandar Sahastrabuddhe, 2016.
1551 *
1552 * This code is released under the libpng license.
1553 * For conditions of distribution and use, see the disclaimer
1554 * and license in png.h
1555 *
1556 * SEE contrib/mips-msa/README before reporting bugs
1557 *
1558 * STATUS: SUPPORTED
1559 * BUG REPORTS: [email protected]
1560 *
1561 * png_have_msa implemented for Linux by reading the widely available
1562 * pseudo-file /proc/cpuinfo.
1563 *
1564 * This code is strict ANSI-C and is probably moderately portable; it does
1565 * however use &lt;stdio.h&gt; and it assumes that /proc/cpuinfo is never localized.
1566 */
1567
1568## Files:
1569pngset.c
1570
1571/* pngset.c - storage of image information into info struct
1572 *
1573 * Copyright (c) 2018-2022 Cosmin Truta
1574 * Copyright (c) 1998-2018 Glenn Randers-Pehrson
1575 * Copyright (c) 1996-1997 Andreas Dilger
1576 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
1577 *
1578 * This code is released under the libpng license.
1579 * For conditions of distribution and use, see the disclaimer
1580 * and license in png.h
1581 *
1582 * The functions here are used during reads to store data from the file
1583 * into the info struct, and during writes to store application data
1584 * into the info struct for writing into the file. This abstracts the
1585 * info struct and allows us to change the structure in the future.
1586 */
1587
1588## Files:
1589contrib/tools/makesRGB.c
1590
1591/* makesRGB.c -- build sRGB-to-linear and linear-to-sRGB conversion tables
1592 *
1593 * Last changed in libpng 1.6.0 [February 14, 2013]
1594 *
1595 * COPYRIGHT: Written by John Cunningham Bowler, 2013.
1596 * To the extent possible under law, the author has waived all copyright and
1597 * related or neighboring rights to this work. This work is published from:
1598 * United States.
1599 *
1600 * Make a table to convert 8-bit sRGB encoding values into the closest 16-bit
1601 * linear value.
1602 *
1603 * Make two tables to take a linear value scaled to 255*65535 and return an
1604 * approximation to the 8-bit sRGB encoded value. Calculate the error in these
1605 * tables and display it.
1606 */
1607
1608## Files:
1609pngtrans.c
1610
1611/* pngtrans.c - transforms the data in a row (used by both readers and writers)
1612 *
1613 * Copyright (c) 2018 Cosmin Truta
1614 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
1615 * Copyright (c) 1996-1997 Andreas Dilger
1616 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
1617 *
1618 * This code is released under the libpng license.
1619 * For conditions of distribution and use, see the disclaimer
1620 * and license in png.h
1621 */
1622
1623## Files:
1624contrib/libtests/fakepng.c
1625
1626/* Fake a PNG - just write it out directly.
1627 *
1628 * COPYRIGHT: Written by John Cunningham Bowler, 2014.
1629 * To the extent possible under law, the author has waived all copyright and
1630 * related or neighboring rights to this work. This work is published from:
1631 * United States.
1632 *
1633 */
1634
1635## Files:
1636contrib/gregbook/rpng-win.c
1637
1638/*---------------------------------------------------------------------------
1639
1640 rpng - simple PNG display program rpng-win.c
1641
1642 This program decodes and displays PNG images, with gamma correction and
1643 optionally with a user-specified background color (in case the image has
1644 transparency). It is very nearly the most basic PNG viewer possible.
1645 This version is for 32-bit Windows; it may compile under 16-bit Windows
1646 with a little tweaking (or maybe not).
1647
1648 to do:
1649 - handle quoted command-line args (especially filenames with spaces)
1650 - have minimum window width: oh well
1651 - use %.1023s to simplify truncation of title-bar string?
1652
1653 ---------------------------------------------------------------------------
1654
1655 Changelog:
1656 - 1.00: initial public release
1657 - 1.01: modified to allow abbreviated options; fixed long/ulong mis-
1658 match; switched to png_jmpbuf() macro
1659 - 1.02: added extra set of parentheses to png_jmpbuf() macro; fixed
1660 command-line parsing bug
1661 - 1.10: enabled &#34;message window&#34;/console (thanks to David Geldreich)
1662 - 2.00: dual-licensed (added GNU GPL)
1663 - 2.01: fixed improper display of usage screen on PNG error(s)
1664 - 2.02: check for integer overflow (Glenn R-P)
1665
1666 ---------------------------------------------------------------------------
1667
1668 Copyright (c) 1998-2008, 2017 Greg Roelofs. All rights reserved.
1669
1670 This software is provided &#34;as is,&#34; without warranty of any kind,
1671 express or implied. In no event shall the author or contributors
1672 be held liable for any damages arising in any way from the use of
1673 this software.
1674
1675 The contents of this file are DUAL-LICENSED. You may modify and/or
1676 redistribute this software according to the terms of one of the
1677 following two licenses (at your option):
1678
1679
1680 LICENSE 1 (&#34;BSD-like with advertising clause&#34;):
1681
1682 Permission is granted to anyone to use this software for any purpose,
1683 including commercial applications, and to alter it and redistribute
1684 it freely, subject to the following restrictions:
1685
1686 1. Redistributions of source code must retain the above copyright
1687 notice, disclaimer, and this list of conditions.
1688 2. Redistributions in binary form must reproduce the above copyright
1689 notice, disclaimer, and this list of conditions in the documenta-
1690 tion and/or other materials provided with the distribution.
1691 3. All advertising materials mentioning features or use of this
1692 software must display the following acknowledgment:
1693
1694 This product includes software developed by Greg Roelofs
1695 and contributors for the book, &#34;PNG: The Definitive Guide,&#34;
1696 published by O&#39;Reilly and Associates.
1697
1698
1699 LICENSE 2 (GNU GPL v2 or later):
1700
1701 This program is free software; you can redistribute it and/or modify
1702 it under the terms of the GNU General Public License as published by
1703 the Free Software Foundation; either version 2 of the License, or
1704 (at your option) any later version.
1705
1706 This program is distributed in the hope that it will be useful,
1707 but WITHOUT ANY WARRANTY; without even the implied warranty of
1708 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1709 GNU General Public License for more details.
1710
1711 You should have received a copy of the GNU General Public License
1712 along with this program; if not, write to the Free Software Foundation,
1713 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1714
1715 ---------------------------------------------------------------------------*/
1716
1717## Files:
1718scripts/intprefix.c
1719
1720/* intprefix.c - generate an unprefixed internal symbol list
1721 *
1722 * Last changed in libpng version 1.6.16 [December 22, 2014]
1723 * Copyright (c) 2013-2014 Glenn Randers-Pehrson
1724 *
1725 * This code is released under the libpng license.
1726 * For conditions of distribution and use, see the disclaimer
1727 * and license in png.h
1728 */
1729
1730## Files:
1731contrib/tools/pngfix.c
1732
1733/* pngfix.c
1734 *
1735 * Last changed in libpng 1.6.31 [July 27, 2017]
1736 * Copyright (c) 2014-2017 John Cunningham Bowler
1737 *
1738 * This code is released under the libpng license.
1739 * For conditions of distribution and use, see the disclaimer
1740 * and license in png.h
1741 *
1742 * Tool to check and fix the zlib inflate &#39;too far back&#39; problem.
1743 * See the usage message for more information.
1744 */
1745
1746## Files:
1747pngtest.c
1748
1749/* pngtest.c - a simple test program to test libpng
1750 *
1751 * Copyright (c) 2018-2019 Cosmin Truta
1752 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
1753 * Copyright (c) 1996-1997 Andreas Dilger
1754 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
1755 *
1756 * This code is released under the libpng license.
1757 * For conditions of distribution and use, see the disclaimer
1758 * and license in png.h
1759 *
1760 * This program reads in a PNG image, writes it out again, and then
1761 * compares the two files. If the files are identical, this shows that
1762 * the basic chunk handling, filtering, and (de)compression code is working
1763 * properly. It does not currently test all of the transforms, although
1764 * it probably should.
1765 *
1766 * The program will report &#34;FAIL&#34; in certain legitimate cases:
1767 * 1) when the compression level or filter selection method is changed.
1768 * 2) when the maximum IDAT size (PNG_ZBUF_SIZE in pngconf.h) is not 8192.
1769 * 3) unknown unsafe-to-copy ancillary chunks or unknown critical chunks
1770 * exist in the input file.
1771 * 4) others not listed here...
1772 * In these cases, it is best to check with another tool such as &#34;pngcheck&#34;
1773 * to see what the differences between the two files are.
1774 *
1775 * If a filename is given on the command-line, then this file is used
1776 * for the input, rather than the default &#34;pngtest.png&#34;. This allows
1777 * testing a wide variety of files easily. You can also test a number
1778 * of files at once by typing &#34;pngtest -m file1.png file2.png ...&#34;
1779 */
1780
1781## Files:
1782contrib/oss-fuzz/libpng_read_fuzzer.cc
1783
1784// libpng_read_fuzzer.cc
1785// Copyright 2017-2018 Glenn Randers-Pehrson
1786// Copyright 2015 The Chromium Authors. All rights reserved.
1787// Use of this source code is governed by a BSD-style license that may
1788// be found in the LICENSE file https://cs.chromium.org/chromium/src/LICENSE
1789
1790## Files:
1791pngrtran.c
1792
1793/* pngrtran.c - transforms the data in a row for PNG readers
1794 *
1795 * Copyright (c) 2018-2019 Cosmin Truta
1796 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
1797 * Copyright (c) 1996-1997 Andreas Dilger
1798 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
1799 *
1800 * This code is released under the libpng license.
1801 * For conditions of distribution and use, see the disclaimer
1802 * and license in png.h
1803 *
1804 * This file contains functions optionally called by an application
1805 * in order to tell libpng how to handle data when reading a PNG.
1806 * Transformations that are used in both reading and writing are
1807 * in pngtrans.c.
1808 */
1809
1810## Files:
1811pngget.c
1812
1813/* pngget.c - retrieval of values from info struct
1814 *
1815 * Copyright (c) 2018 Cosmin Truta
1816 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
1817 * Copyright (c) 1996-1997 Andreas Dilger
1818 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
1819 *
1820 * This code is released under the libpng license.
1821 * For conditions of distribution and use, see the disclaimer
1822 * and license in png.h
1823 *
1824 */
1825
1826## Files:
1827contrib/libtests/readpng.c
1828
1829/* readpng.c
1830 *
1831 * Copyright (c) 2013 John Cunningham Bowler
1832 *
1833 * This code is released under the libpng license.
1834 * For conditions of distribution and use, see the disclaimer
1835 * and license in png.h
1836 *
1837 * Load an arbitrary number of PNG files (from the command line, or, if there
1838 * are no arguments on the command line, from stdin) then run a time test by
1839 * reading each file by row. The test does nothing with the read result and
1840 * does no transforms. The only output is a time as a floating point number of
1841 * seconds with 9 decimal digits.
1842 */
1843
1844## Files:
1845pngstruct.h
1846
1847/* pngstruct.h - header file for PNG reference library
1848 *
1849 * Copyright (c) 2018-2022 Cosmin Truta
1850 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
1851 * Copyright (c) 1996-1997 Andreas Dilger
1852 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
1853 *
1854 * This code is released under the libpng license.
1855 * For conditions of distribution and use, see the disclaimer
1856 * and license in png.h
1857 */
1858
1859## Files:
1860pngpread.c
1861
1862/* pngpread.c - read a png file in push mode
1863 *
1864 * Copyright (c) 2018 Cosmin Truta
1865 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
1866 * Copyright (c) 1996-1997 Andreas Dilger
1867 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
1868 *
1869 * This code is released under the libpng license.
1870 * For conditions of distribution and use, see the disclaimer
1871 * and license in png.h
1872 */
1873
1874## Files:
1875png.c
1876
1877/* png.c - location for general purpose libpng functions
1878 *
1879 * Copyright (c) 2018-2022 Cosmin Truta
1880 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
1881 * Copyright (c) 1996-1997 Andreas Dilger
1882 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
1883 *
1884 * This code is released under the libpng license.
1885 * For conditions of distribution and use, see the disclaimer
1886 * and license in png.h
1887 */
1888
1889## Files:
1890contrib/gregbook/writepng.c
1891
1892/*---------------------------------------------------------------------------
1893
1894 wpng - simple PNG-writing program writepng.c
1895
1896 ---------------------------------------------------------------------------
1897
1898 Copyright (c) 1998-2007, 2017 Greg Roelofs. All rights reserved.
1899
1900 This software is provided &#34;as is,&#34; without warranty of any kind,
1901 express or implied. In no event shall the author or contributors
1902 be held liable for any damages arising in any way from the use of
1903 this software.
1904
1905 The contents of this file are DUAL-LICENSED. You may modify and/or
1906 redistribute this software according to the terms of one of the
1907 following two licenses (at your option):
1908
1909
1910 LICENSE 1 (&#34;BSD-like with advertising clause&#34;):
1911
1912 Permission is granted to anyone to use this software for any purpose,
1913 including commercial applications, and to alter it and redistribute
1914 it freely, subject to the following restrictions:
1915
1916 1. Redistributions of source code must retain the above copyright
1917 notice, disclaimer, and this list of conditions.
1918 2. Redistributions in binary form must reproduce the above copyright
1919 notice, disclaimer, and this list of conditions in the documenta-
1920 tion and/or other materials provided with the distribution.
1921 3. All advertising materials mentioning features or use of this
1922 software must display the following acknowledgment:
1923
1924 This product includes software developed by Greg Roelofs
1925 and contributors for the book, &#34;PNG: The Definitive Guide,&#34;
1926 published by O&#39;Reilly and Associates.
1927
1928
1929 LICENSE 2 (GNU GPL v2 or later):
1930
1931 This program is free software; you can redistribute it and/or modify
1932 it under the terms of the GNU General Public License as published by
1933 the Free Software Foundation; either version 2 of the License, or
1934 (at your option) any later version.
1935
1936 This program is distributed in the hope that it will be useful,
1937 but WITHOUT ANY WARRANTY; without even the implied warranty of
1938 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1939 GNU General Public License for more details.
1940
1941 You should have received a copy of the GNU General Public License
1942 along with this program; if not, write to the Free Software Foundation,
1943 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1944
1945 ---------------------------------------------------------------------------*/
1946
1947## Files:
1948contrib/testpngs/makepngs.sh
1949
1950# Copyright (c) 2015 John Cunningham Bowler
1951
1952## Files:
1953pnginfo.h
1954
1955/* pnginfo.h - header file for PNG reference library
1956 *
1957 * Copyright (c) 2018 Cosmin Truta
1958 * Copyright (c) 1998-2002,2004,2006-2013,2018 Glenn Randers-Pehrson
1959 * Copyright (c) 1996-1997 Andreas Dilger
1960 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
1961 *
1962 * This code is released under the libpng license.
1963 * For conditions of distribution and use, see the disclaimer
1964 * and license in png.h
1965 */
1966
1967## Files:
1968contrib/gregbook/writepng.h
1969
1970/*---------------------------------------------------------------------------
1971
1972 wpng - simple PNG-writing program writepng.h
1973
1974 ---------------------------------------------------------------------------
1975
1976 Copyright (c) 1998-2007 Greg Roelofs. All rights reserved.
1977
1978 This software is provided &#34;as is,&#34; without warranty of any kind,
1979 express or implied. In no event shall the author or contributors
1980 be held liable for any damages arising in any way from the use of
1981 this software.
1982
1983 The contents of this file are DUAL-LICENSED. You may modify and/or
1984 redistribute this software according to the terms of one of the
1985 following two licenses (at your option):
1986
1987
1988 LICENSE 1 (&#34;BSD-like with advertising clause&#34;):
1989
1990 Permission is granted to anyone to use this software for any purpose,
1991 including commercial applications, and to alter it and redistribute
1992 it freely, subject to the following restrictions:
1993
1994 1. Redistributions of source code must retain the above copyright
1995 notice, disclaimer, and this list of conditions.
1996 2. Redistributions in binary form must reproduce the above copyright
1997 notice, disclaimer, and this list of conditions in the documenta-
1998 tion and/or other materials provided with the distribution.
1999 3. All advertising materials mentioning features or use of this
2000 software must display the following acknowledgment:
2001
2002 This product includes software developed by Greg Roelofs
2003 and contributors for the book, &#34;PNG: The Definitive Guide,&#34;
2004 published by O&#39;Reilly and Associates.
2005
2006
2007 LICENSE 2 (GNU GPL v2 or later):
2008
2009 This program is free software; you can redistribute it and/or modify
2010 it under the terms of the GNU General Public License as published by
2011 the Free Software Foundation; either version 2 of the License, or
2012 (at your option) any later version.
2013
2014 This program is distributed in the hope that it will be useful,
2015 but WITHOUT ANY WARRANTY; without even the implied warranty of
2016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2017 GNU General Public License for more details.
2018
2019 You should have received a copy of the GNU General Public License
2020 along with this program; if not, write to the Free Software Foundation,
2021 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2022
2023 ---------------------------------------------------------------------------*/
2024
2025## Files:
2026contrib/visupng/PngFile.h
2027
2028/* Copyright 2000, Willem van Schaik.*/
2029
2030## Files:
2031contrib/tools/pngcp.c
2032
2033/* pngcp.c
2034 *
2035 * Copyright (c) 2016 John Cunningham Bowler
2036 *
2037 * Last changed in libpng 1.6.24 [August 4, 2016]
2038 *
2039 * This code is released under the libpng license.
2040 * For conditions of distribution and use, see the disclaimer
2041 * and license in png.h
2042 *
2043 * This is an example of copying a PNG without changes using the png_read_png
2044 * and png_write_png interfaces. A considerable number of options are provided
2045 * to manipulate the compression of the PNG data and other compressed chunks.
2046 *
2047 * For a more extensive example that uses the transforms see
2048 * contrib/libtests/pngimage.c in the libpng distribution.
2049 */
2050
2051## Files:
2052png.h
2053
2054/* With all write APIs if image is in one of the linear formats with 16-bit
2055 * data then setting convert_to_8_bit will cause the output to be an 8-bit PNG
2056 * gamma encoded according to the sRGB specification, otherwise a 16-bit linear
2057 * encoded PNG file is written.
2058 *
2059 * With color-mapped data formats the colormap parameter point to a color-map
2060 * with at least image-&gt;colormap_entries encoded in the specified format. If
2061 * the format is linear the written PNG color-map will be converted to sRGB
2062 * regardless of the convert_to_8_bit flag.
2063 *
2064 * With all APIs row_stride is handled as in the read APIs - it is the spacing
2065 * from one row to the next in component sized units (1 or 2 bytes) and if
2066 * negative indicates a bottom-up row layout in the buffer. If row_stride is
2067 * zero, libpng will calculate it for you from the image width and number of
2068 * channels.
2069 *
2070 * Note that the write API does not support interlacing, sub-8-bit pixels or
2071 * most ancillary chunks. If you need to write text chunks (e.g. for copyright
2072 * notices) you need to use one of the other APIs.
2073 */
2074
2075## Files:
2076contrib/tools/cvtcolor.c
2077
2078/*-
2079 * convert.c
2080 *
2081 * Last changed in libpng 1.6.0 [February 14, 2013]
2082 *
2083 * COPYRIGHT: Written by John Cunningham Bowler, 2013.
2084 * To the extent possible under law, the author has waived all copyright and
2085 * related or neighboring rights to this work. This work is published from:
2086 * United States.
2087 *
2088 * Convert 8-bit sRGB or 16-bit linear values to another format.
2089 */
2090
2091## Files:
2092png.h
2093
2094/*
2095 * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
2096 * =========================================
2097 *
2098 * PNG Reference Library License version 2
2099 * ---------------------------------------
2100 *
2101 * * Copyright (c) 1995-2022 The PNG Reference Library Authors.
2102 * * Copyright (c) 2018-2022 Cosmin Truta.
2103 * * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
2104 * * Copyright (c) 1996-1997 Andreas Dilger.
2105 * * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
2106 *
2107 * The software is supplied &#34;as is&#34;, without warranty of any kind,
2108 * express or implied, including, without limitation, the warranties
2109 * of merchantability, fitness for a particular purpose, title, and
2110 * non-infringement. In no event shall the Copyright owners, or
2111 * anyone distributing the software, be liable for any damages or
2112 * other liability, whether in contract, tort or otherwise, arising
2113 * from, out of, or in connection with the software, or the use or
2114 * other dealings in the software, even if advised of the possibility
2115 * of such damage.
2116 *
2117 * Permission is hereby granted to use, copy, modify, and distribute
2118 * this software, or portions hereof, for any purpose, without fee,
2119 * subject to the following restrictions:
2120 *
2121 * 1. The origin of this software must not be misrepresented; you
2122 * must not claim that you wrote the original software. If you
2123 * use this software in a product, an acknowledgment in the product
2124 * documentation would be appreciated, but is not required.
2125 *
2126 * 2. Altered source versions must be plainly marked as such, and must
2127 * not be misrepresented as being the original software.
2128 *
2129 * 3. This Copyright notice may not be removed or altered from any
2130 * source or altered source distribution.
2131 *
2132 *
2133 * PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35)
2134 * -----------------------------------------------------------------------
2135 *
2136 * libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are
2137 * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
2138 * derived from libpng-1.0.6, and are distributed according to the same
2139 * disclaimer and license as libpng-1.0.6 with the following individuals
2140 * added to the list of Contributing Authors:
2141 *
2142 * Simon-Pierre Cadieux
2143 * Eric S. Raymond
2144 * Mans Rullgard
2145 * Cosmin Truta
2146 * Gilles Vollant
2147 * James Yu
2148 * Mandar Sahastrabuddhe
2149 * Google Inc.
2150 * Vadim Barkov
2151 *
2152 * and with the following additions to the disclaimer:
2153 *
2154 * There is no warranty against interference with your enjoyment of
2155 * the library or against infringement. There is no warranty that our
2156 * efforts or the library will fulfill any of your particular purposes
2157 * or needs. This library is provided with all faults, and the entire
2158 * risk of satisfactory quality, performance, accuracy, and effort is
2159 * with the user.
2160 *
2161 * Some files in the &#34;contrib&#34; directory and some configure-generated
2162 * files that are distributed with libpng have other copyright owners, and
2163 * are released under other open source licenses.
2164 *
2165 * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
2166 * Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
2167 * libpng-0.96, and are distributed according to the same disclaimer and
2168 * license as libpng-0.96, with the following individuals added to the
2169 * list of Contributing Authors:
2170 *
2171 * Tom Lane
2172 * Glenn Randers-Pehrson
2173 * Willem van Schaik
2174 *
2175 * libpng versions 0.89, June 1996, through 0.96, May 1997, are
2176 * Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
2177 * and are distributed according to the same disclaimer and license as
2178 * libpng-0.88, with the following individuals added to the list of
2179 * Contributing Authors:
2180 *
2181 * John Bowler
2182 * Kevin Bracey
2183 * Sam Bushell
2184 * Magnus Holmgren
2185 * Greg Roelofs
2186 * Tom Tanner
2187 *
2188 * Some files in the &#34;scripts&#34; directory have other copyright owners,
2189 * but are released under this license.
2190 *
2191 * libpng versions 0.5, May 1995, through 0.88, January 1996, are
2192 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
2193 *
2194 * For the purposes of this copyright and license, &#34;Contributing Authors&#34;
2195 * is defined as the following set of individuals:
2196 *
2197 * Andreas Dilger
2198 * Dave Martindale
2199 * Guy Eric Schalnat
2200 * Paul Schmidt
2201 * Tim Wegner
2202 *
2203 * The PNG Reference Library is supplied &#34;AS IS&#34;. The Contributing
2204 * Authors and Group 42, Inc. disclaim all warranties, expressed or
2205 * implied, including, without limitation, the warranties of
2206 * merchantability and of fitness for any purpose. The Contributing
2207 * Authors and Group 42, Inc. assume no liability for direct, indirect,
2208 * incidental, special, exemplary, or consequential damages, which may
2209 * result from the use of the PNG Reference Library, even if advised of
2210 * the possibility of such damage.
2211 *
2212 * Permission is hereby granted to use, copy, modify, and distribute this
2213 * source code, or portions hereof, for any purpose, without fee, subject
2214 * to the following restrictions:
2215 *
2216 * 1. The origin of this source code must not be misrepresented.
2217 *
2218 * 2. Altered versions must be plainly marked as such and must not
2219 * be misrepresented as being the original source.
2220 *
2221 * 3. This Copyright notice may not be removed or altered from any
2222 * source or altered source distribution.
2223 *
2224 * The Contributing Authors and Group 42, Inc. specifically permit,
2225 * without fee, and encourage the use of this source code as a component
2226 * to supporting the PNG file format in commercial products. If you use
2227 * this source code in a product, acknowledgment is not required but would
2228 * be appreciated.
2229 *
2230 * END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE.
2231 *
2232 * TRADEMARK
2233 * =========
2234 *
2235 * The name &#34;libpng&#34; has not been registered by the Copyright owners
2236 * as a trademark in any jurisdiction. However, because libpng has
2237 * been distributed and maintained world-wide, continually since 1995,
2238 * the Copyright owners claim &#34;common-law trademark protection&#34; in any
2239 * jurisdiction where common-law trademark is recognized.
2240 */
2241
2242## Files:
2243scripts/sym.c
2244
2245/* sym.c - define format of libpng.sym
2246 *
2247 * Last changed in libpng version 1.6.16 [December 22, 2014]
2248 * Copyright (c) 2011-2014 Glenn Randers-Pehrson
2249 *
2250 * This code is released under the libpng license.
2251 * For conditions of distribution and use, see the disclaimer
2252 * and license in png.h
2253 */
2254
2255## Files:
2256contrib/gregbook/rpng2-x.c
2257
2258/*---------------------------------------------------------------------------
2259
2260 rpng2 - progressive-model PNG display program rpng2-x.c
2261
2262 This program decodes and displays PNG files progressively, as if it were
2263 a web browser (though the front end is only set up to read from files).
2264 It supports gamma correction, user-specified background colors, and user-
2265 specified background patterns (for transparent images). This version is
2266 for the X Window System (tested by the author under Unix and by Martin
2267 Zinser under OpenVMS; may work under OS/2 with a little tweaking).
2268
2269 Thanks to Adam Costello and Pieter S. van der Meulen for the &#34;diamond&#34;
2270 and &#34;radial waves&#34; patterns, respectively.
2271
2272 to do (someday, maybe):
2273 - fix expose/redraw code: don&#39;t draw entire row if only part exposed
2274 - 8-bit (colormapped) X support
2275 - finish resizable checkerboard-gradient (sizes 4-128?)
2276 - use %.1023s to simplify truncation of title-bar string?
2277
2278 ---------------------------------------------------------------------------
2279
2280 Changelog:
2281 - 1.01: initial public release
2282 - 1.02: modified to allow abbreviated options; fixed char/uchar mismatch
2283 - 1.10: added support for non-default visuals; fixed X pixel-conversion
2284 - 1.11: added -usleep option for demos; fixed command-line parsing bug
2285 - 1.12: added -pause option for demos and testing
2286 - 1.20: added runtime MMX-enabling/disabling and new -mmx* options
2287 - 1.21: fixed some small X memory leaks (thanks to Fran�ois Petitjean)
2288 - 1.22: fixed XFreeGC() crash bug (thanks to Patrick Welche)
2289 - 1.23: added -bgpat 0 mode (std white/gray checkerboard, 8x8 squares)
2290 - 1.30: added -loop option for -bgpat (ifdef FEATURE_LOOP); fixed bpp =
2291 24; added support for X resources (thanks to Gerhard Niklasch)
2292 - 1.31: added code to skip unused chunks (thanks to Glenn Randers-Pehrson)
2293 - 1.32: added AMD64/EM64T support (__x86_64__); added basic expose/redraw
2294 handling
2295 - 2.00: dual-licensed (added GNU GPL)
2296 - 2.01: fixed 64-bit typo in readpng2.c; fixed -pause usage description
2297 - 2.02: fixed improper display of usage screen on PNG error(s); fixed
2298 unexpected-EOF and file-read-error cases; fixed Trace() cut-and-
2299 paste bugs
2300 - 2.03: deleted runtime MMX-enabling/disabling and obsolete -mmx* options
2301 - 2.04: Added &#34;void(foo);&#34; statements to quiet pedantic compiler warnings
2302 about unused variables (GR-P)
2303 - 2.05: Use nanosleep() instead of usleep(), which is deprecated (GR-P).
2304 - 2.06: check for integer overflow (Glenn R-P)
2305 ---------------------------------------------------------------------------
2306
2307 Copyright (c) 1998-2010, 2014-2015, 2017 Greg Roelofs. All rights
2308 reserved.
2309
2310 This software is provided &#34;as is,&#34; without warranty of any kind,
2311 express or implied. In no event shall the author or contributors
2312 be held liable for any damages arising in any way from the use of
2313 this software.
2314
2315 The contents of this file are DUAL-LICENSED. You may modify and/or
2316 redistribute this software according to the terms of one of the
2317 following two licenses (at your option):
2318
2319
2320 LICENSE 1 (&#34;BSD-like with advertising clause&#34;):
2321
2322 Permission is granted to anyone to use this software for any purpose,
2323 including commercial applications, and to alter it and redistribute
2324 it freely, subject to the following restrictions:
2325
2326 1. Redistributions of source code must retain the above copyright
2327 notice, disclaimer, and this list of conditions.
2328 2. Redistributions in binary form must reproduce the above copyright
2329 notice, disclaimer, and this list of conditions in the documenta-
2330 tion and/or other materials provided with the distribution.
2331 3. All advertising materials mentioning features or use of this
2332 software must display the following acknowledgment:
2333
2334 This product includes software developed by Greg Roelofs
2335 and contributors for the book, &#34;PNG: The Definitive Guide,&#34;
2336 published by O&#39;Reilly and Associates.
2337
2338
2339 LICENSE 2 (GNU GPL v2 or later):
2340
2341 This program is free software; you can redistribute it and/or modify
2342 it under the terms of the GNU General Public License as published by
2343 the Free Software Foundation; either version 2 of the License, or
2344 (at your option) any later version.
2345
2346 This program is distributed in the hope that it will be useful,
2347 but WITHOUT ANY WARRANTY; without even the implied warranty of
2348 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2349 GNU General Public License for more details.
2350
2351 You should have received a copy of the GNU General Public License
2352 along with this program; if not, write to the Free Software Foundation,
2353 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2354
2355 ---------------------------------------------------------------------------*/
2356
2357## Files:
2358contrib/gregbook/readpng2.c
2359
2360/*---------------------------------------------------------------------------
2361
2362 rpng2 - progressive-model PNG display program readpng2.c
2363
2364 ---------------------------------------------------------------------------
2365
2366 Copyright (c) 1998-2015 Greg Roelofs. All rights reserved.
2367
2368 This software is provided &#34;as is,&#34; without warranty of any kind,
2369 express or implied. In no event shall the author or contributors
2370 be held liable for any damages arising in any way from the use of
2371 this software.
2372
2373 The contents of this file are DUAL-LICENSED. You may modify and/or
2374 redistribute this software according to the terms of one of the
2375 following two licenses (at your option):
2376
2377
2378 LICENSE 1 (&#34;BSD-like with advertising clause&#34;):
2379
2380 Permission is granted to anyone to use this software for any purpose,
2381 including commercial applications, and to alter it and redistribute
2382 it freely, subject to the following restrictions:
2383
2384 1. Redistributions of source code must retain the above copyright
2385 notice, disclaimer, and this list of conditions.
2386 2. Redistributions in binary form must reproduce the above copyright
2387 notice, disclaimer, and this list of conditions in the documenta-
2388 tion and/or other materials provided with the distribution.
2389 3. All advertising materials mentioning features or use of this
2390 software must display the following acknowledgment:
2391
2392 This product includes software developed by Greg Roelofs
2393 and contributors for the book, &#34;PNG: The Definitive Guide,&#34;
2394 published by O&#39;Reilly and Associates.
2395
2396
2397 LICENSE 2 (GNU GPL v2 or later):
2398
2399 This program is free software; you can redistribute it and/or modify
2400 it under the terms of the GNU General Public License as published by
2401 the Free Software Foundation; either version 2 of the License, or
2402 (at your option) any later version.
2403
2404 This program is distributed in the hope that it will be useful,
2405 but WITHOUT ANY WARRANTY; without even the implied warranty of
2406 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2407 GNU General Public License for more details.
2408
2409 You should have received a copy of the GNU General Public License
2410 along with this program; if not, write to the Free Software Foundation,
2411 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2412
2413 ---------------------------------------------------------------------------
2414
2415 Changelog:
2416 2015-11-12 - Check return value of png_get_bKGD() (Glenn R-P)
2417 2017-04-22 - Guard against integer overflow (Glenn R-P)
2418
2419 ---------------------------------------------------------------------------*/
2420
2421## Files:
2422contrib/examples/simpleover.c
2423
2424/*- simpleover
2425 *
2426 * COPYRIGHT: Written by John Cunningham Bowler, 2015.
2427 * To the extent possible under law, the author has waived all copyright and
2428 * related or neighboring rights to this work. This work is published from:
2429 * United States.
2430 *
2431 * Read several PNG files, which should have an alpha channel or transparency
2432 * information, and composite them together to produce one or more 16-bit linear
2433 * RGBA intermediates. This involves doing the correct &#39;over&#39; composition to
2434 * combine the alpha channels and corresponding data.
2435 *
2436 * Finally read an output (background) PNG using the 24-bit RGB format (the
2437 * PNG will be composited on green (#00ff00) by default if it has an alpha
2438 * channel), and apply the intermediate image generated above to specified
2439 * locations in the image.
2440 *
2441 * The command line has the general format:
2442 *
2443 * simpleover &lt;background.png&gt; [output.png]
2444 * {--sprite=width,height,name {[--at=x,y] {sprite.png}}}
2445 * {--add=name {x,y}}
2446 *
2447 * The --sprite and --add options may occur multiple times. They are executed
2448 * in order. --add may refer to any sprite already read.
2449 *
2450 * This code is intended to show how to composite multiple images together
2451 * correctly. Apart from the libpng Simplified API the only work done in here
2452 * is to combine multiple input PNG images into a single sprite; this involves
2453 * a Porter-Duff &#39;over&#39; operation and the input PNG images may, as a result,
2454 * be regarded as being layered one on top of the other with the first (leftmost
2455 * on the command line) being at the bottom and the last on the top.
2456 */
2457
2458## Files:
2459ci/ci_autotools.sh
2460
2461# ci_autotools.sh
2462# Continuously integrate libpng using the GNU Autotools.
2463#
2464# Copyright (c) 2019-2022 Cosmin Truta.
2465#
2466# This software is released under the libpng license.
2467# For conditions of distribution and use, see the disclaimer
2468# and license in png.h.
2469
2470## Files:
2471contrib/examples/pngtopng.c
2472
2473/*- pngtopng
2474 *
2475 * COPYRIGHT: Written by John Cunningham Bowler, 2011, 2017.
2476 * To the extent possible under law, the author has waived all copyright and
2477 * related or neighboring rights to this work. This work is published from:
2478 * United States.
2479 *
2480 * Last changed in libpng 1.6.29 [March 16, 2017]
2481 *
2482 * Read a PNG and write it out in a fixed format, using the &#39;simplified API&#39;
2483 * that was introduced in libpng-1.6.0.
2484 *
2485 * This sample code is just the code from the top of &#39;example.c&#39; with some error
2486 * handling added. See example.c for more comments.
2487 */
2488
2489## Files:
2490contrib/pngminim/preader/pngusr.h
2491
2492/* minrdpngconf.h: headers to make a minimal png-read-only library
2493 *
2494 * Copyright (c) 2009, 2010-2013 Glenn Randers-Pehrson
2495 *
2496 * This code is released under the libpng license.
2497 * For conditions of distribution and use, see the disclaimer
2498 * and license in png.h
2499 *
2500 * Derived from pngcrush.h, Copyright 1998-2007, Glenn Randers-Pehrson
2501 */
2502
2503## Files:
2504contrib/arm-neon/android-ndk.c
2505
2506/* contrib/arm-neon/android-ndk.c
2507 *
2508 * Copyright (c) 2014 Glenn Randers-Pehrson
2509 * Written by John Bowler, 2014.
2510 * Last changed in libpng 1.6.10 [March 6, 2014]
2511 *
2512 * This code is released under the libpng license.
2513 * For conditions of distribution and use, see the disclaimer
2514 * and license in png.h
2515 *
2516 * SEE contrib/arm-neon/README before reporting bugs
2517 *
2518 * STATUS: COMPILED, UNTESTED
2519 * BUG REPORTS: [email protected]
2520 *
2521 * png_have_neon implemented for the Android NDK, see:
2522 *
2523 * Documentation:
2524 * http://www.kandroid.org/ndk/docs/CPU-ARM-NEON.html
2525 * https://code.google.com/p/android/issues/detail?id=49065
2526 *
2527 * NOTE: this requires that libpng is built against the Android NDK and linked
2528 * with an implementation of the Android ARM &#39;cpu-features&#39; library. The code
2529 * has been compiled only, not linked: no version of the library has been found,
2530 * only the header files exist in the NDK.
2531 */
2532
2533## Files:
2534contrib/libtests/tarith.c
2535
2536/* tarith.c
2537 *
2538 * Copyright (c) 2021 Cosmin Truta
2539 * Copyright (c) 2011-2013 John Cunningham Bowler
2540 *
2541 * This code is released under the libpng license.
2542 * For conditions of distribution and use, see the disclaimer
2543 * and license in png.h
2544 *
2545 * Test internal arithmetic functions of libpng.
2546 *
2547 * This code must be linked against a math library (-lm), but does not require
2548 * libpng or zlib to work. Because it includes the complete source of &#39;png.c&#39;
2549 * it tests the code with whatever compiler options are used to build it.
2550 * Changing these options can substantially change the errors in the
2551 * calculations that the compiler chooses!
2552 */
2553
2554## Files:
2555contrib/tools/genpng.c
2556
2557/*- genpng
2558 *
2559 * COPYRIGHT: Written by John Cunningham Bowler, 2015.
2560 * Revised by Glenn Randers-Pehrson, 2017, to add buffer-size check.
2561 * To the extent possible under law, the authors have waived all copyright and
2562 * related or neighboring rights to this work. This work is published from:
2563 * United States.
2564 *
2565 * Generate a PNG with an alpha channel, correctly.
2566 *
2567 * This is a test case generator; the resultant PNG files are only of interest
2568 * to those of us who care about whether the edges of circles are green, red,
2569 * or yellow.
2570 *
2571 * The program generates an RGB+Alpha PNG of a given size containing the given
2572 * shapes on a transparent background:
2573 *
2574 * genpng width height { shape }
2575 * shape ::= color width shape x1 y1 x2 y2
2576 *
2577 * &#39;color&#39; is:
2578 *
2579 * black white red green yellow blue brown purple pink orange gray cyan
2580 *
2581 * The point is to have colors that are linguistically meaningful plus that old
2582 * bugbear of the department store dress murders, Cyan, the only color we argue
2583 * about.
2584 *
2585 * &#39;shape&#39; is:
2586 *
2587 * circle: an ellipse
2588 * square: a rectangle
2589 * line: a straight line
2590 *
2591 * Each shape is followed by four numbers, these are two points in the output
2592 * coordinate space (as real numbers) which describe the circle, square, or
2593 * line. The shape is filled if it is preceded by &#39;filled&#39; (not valid for
2594 * &#39;line&#39;) or is drawn with a line, in which case the width of the line must
2595 * precede the shape.
2596 *
2597 * The whole set of information can be repeated as many times as desired:
2598 *
2599 * shape ::= color width shape x1 y1 x2 y2
2600 *
2601 * color ::= black|white|red|green|yellow|blue
2602 * color ::= brown|purple|pink|orange|gray|cyan
2603 * width ::= filled
2604 * width ::= &lt;number&gt;
2605 * shape ::= circle|square|line
2606 * x1 ::= &lt;number&gt;
2607 * x2 ::= &lt;number&gt;
2608 * y1 ::= &lt;number&gt;
2609 * y2 ::= &lt;number&gt;
2610 *
2611 * The output PNG is generated by down-sampling a 4x supersampled image using
2612 * a bi-cubic filter. The bi-cubic has a 2 (output) pixel width, so an 8x8
2613 * array of super-sampled points contribute to each output pixel. The value of
2614 * a super-sampled point is found using an unfiltered, aliased, infinite
2615 * precision image: Each shape from the last to the first is checked to see if
2616 * the point is in the drawn area and, if it is, the color of the point is the
2617 * color of the shape and the alpha is 1, if not the previous shape is checked.
2618 *
2619 * This is an aliased algorithm because no filtering is done; a point is either
2620 * inside or outside each shape and &#39;close&#39; points do not contribute to the
2621 * sample. The down-sampling is relied on to correct the error of not using
2622 * a filter.
2623 *
2624 * The line end-caps are &#39;flat&#39;; they go through the points. The square line
2625 * joins are mitres; the outside of the lines are continued to the point of
2626 * intersection.
2627 */
2628
2629## Files:
2630contrib/tools/png-fix-itxt.c
2631
2632/* png-fix-itxt version 1.0.0
2633 *
2634 * Copyright 2015 Glenn Randers-Pehrson
2635 * Last changed in libpng 1.6.18 [July 23, 2015]
2636 *
2637 * This code is released under the libpng license.
2638 * For conditions of distribution and use, see the disclaimer
2639 * and license in png.h
2640 *
2641 * Usage:
2642 *
2643 * png-fix-itxt.exe &lt; bad.png &gt; good.png
2644 *
2645 * Fixes a PNG file written with libpng-1.6.0 or 1.6.1 that has one or more
2646 * uncompressed iTXt chunks. Assumes that the actual length is greater
2647 * than or equal to the value in the length byte, and that the CRC is
2648 * correct for the actual length. This program hunts for the CRC and
2649 * adjusts the length byte accordingly. It is not an error to process a
2650 * PNG file that has no iTXt chunks or one that has valid iTXt chunks;
2651 * such files will simply be copied.
2652 *
2653 * Requires zlib (for crc32 and Z_NULL); build with
2654 *
2655 * gcc -O -o png-fix-itxt png-fix-itxt.c -lz
2656 *
2657 * If you need to handle iTXt chunks larger than 500000 kbytes you must
2658 * rebuild png-fix-itxt with a larger values of MAX_LENGTH (or a smaller value
2659 * if you know you will never encounter such huge iTXt chunks).
2660 */
2661
2662## Files:
2663pngwrite.c
2664
2665/* pngwrite.c - general routines to write a PNG file
2666 *
2667 * Copyright (c) 2018-2022 Cosmin Truta
2668 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
2669 * Copyright (c) 1996-1997 Andreas Dilger
2670 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
2671 *
2672 * This code is released under the libpng license.
2673 * For conditions of distribution and use, see the disclaimer
2674 * and license in png.h
2675 */
2676
2677## Files:
2678contrib/visupng/VisualPng.c
2679
2680/*------------------------------------
2681 * VisualPng.C -- Shows a PNG image
2682 *------------------------------------
2683 *
2684 * Copyright 2000,2017 Willem van Schaik.
2685 *
2686 * This code is released under the libpng license.
2687 * For conditions of distribution and use, see the disclaimer
2688 * and license in png.h
2689 */
2690
2691## Files:
2692contrib/testpngs/makepngs.sh
2693
2694# This code is released under the libpng license.
2695# For conditions of distribution and use, see the disclaimer
2696# and license in png.h
2697
2698## Files:
2699pngdebug.h
2700
2701/* pngdebug.h - Debugging macros for libpng, also used in pngtest.c
2702 *
2703 * Copyright (c) 2018 Cosmin Truta
2704 * Copyright (c) 1998-2002,2004,2006-2013 Glenn Randers-Pehrson
2705 * Copyright (c) 1996-1997 Andreas Dilger
2706 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
2707 *
2708 * This code is released under the libpng license.
2709 * For conditions of distribution and use, see the disclaimer
2710 * and license in png.h
2711 */
2712
2713## Files:
2714mips/filter_msa_intrinsics.c
2715
2716/* filter_msa_intrinsics.c - MSA optimised filter functions
2717 *
2718 * Copyright (c) 2018 Cosmin Truta
2719 * Copyright (c) 2016 Glenn Randers-Pehrson
2720 * Written by Mandar Sahastrabuddhe, August 2016.
2721 *
2722 * This code is released under the libpng license.
2723 * For conditions of distribution and use, see the disclaimer
2724 * and license in png.h
2725 */
2726
2727## Files:
2728pngpriv.h
2729
2730/* pngpriv.h - private declarations for use inside libpng
2731 *
2732 * Copyright (c) 2018-2022 Cosmin Truta
2733 * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson
2734 * Copyright (c) 1996-1997 Andreas Dilger
2735 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
2736 *
2737 * This code is released under the libpng license.
2738 * For conditions of distribution and use, see the disclaimer
2739 * and license in png.h
2740 */
2741
2742## Files:
2743ltmain.sh
2744
2745# This is free software. There is NO warranty; not even for
2746# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
2747#
2748# Copyright (C) 2010-2019, 2021 Bootstrap Authors
2749#
2750# This file is dual licensed under the terms of the MIT license
2751# &lt;https://opensource.org/license/MIT&gt;, and GPL version 2 or later
2752# &lt;http://www.gnu.org/licenses/gpl-2.0.html&gt;. You must apply one of
2753# these licenses when using or redistributing this software or any of
2754# the files within it. See the URLs above, or the file `LICENSE`
2755# included in the Bootstrap distribution for the full license texts.
2756
2757## Files:
2758scripts/prefix.c
2759
2760/* prefix.c - generate an unprefixed symbol list
2761 *
2762 * Last changed in libpng version 1.6.16 [December 22, 2014]
2763 * Copyright (c) 2013-2014 Glenn Randers-Pehrson
2764 *
2765 * This code is released under the libpng license.
2766 * For conditions of distribution and use, see the disclaimer
2767 * and license in png.h
2768 */
2769
2770## Files:
2771ci/ci_legacy.sh
2772
2773# ci_legacy.sh
2774# Continuously integrate libpng using the legacy makefiles.
2775#
2776# Copyright (c) 2019-2022 Cosmin Truta.
2777#
2778# This software is released under the libpng license.
2779# For conditions of distribution and use, see the disclaimer
2780# and license in png.h.
2781
2782## Files:
2783contrib/libtests/pngvalid.c
2784
2785/* pngvalid.c - validate libpng by constructing then reading png files.
2786 *
2787 * Copyright (c) 2021 Cosmin Truta
2788 * Copyright (c) 2014-2017 John Cunningham Bowler
2789 *
2790 * This code is released under the libpng license.
2791 * For conditions of distribution and use, see the disclaimer
2792 * and license in png.h
2793 *
2794 * NOTES:
2795 * This is a C program that is intended to be linked against libpng. It
2796 * generates bitmaps internally, stores them as PNG files (using the
2797 * sequential write code) then reads them back (using the sequential
2798 * read code) and validates that the result has the correct data.
2799 *
2800 * The program can be modified and extended to test the correctness of
2801 * transformations performed by libpng.
2802 */
2803
2804## Files:
2805contrib/visupng/PngFile.h
2806
2807/* This code is released under the libpng license.*/
2808
2809## Files:
2810contrib/gregbook/readpng2.h
2811
2812/*---------------------------------------------------------------------------
2813
2814 rpng2 - progressive-model PNG display program readpng2.h
2815
2816 ---------------------------------------------------------------------------
2817
2818 Copyright (c) 1998-2008 Greg Roelofs. All rights reserved.
2819
2820 This software is provided &#34;as is,&#34; without warranty of any kind,
2821 express or implied. In no event shall the author or contributors
2822 be held liable for any damages arising in any way from the use of
2823 this software.
2824
2825 The contents of this file are DUAL-LICENSED. You may modify and/or
2826 redistribute this software according to the terms of one of the
2827 following two licenses (at your option):
2828
2829
2830 LICENSE 1 (&#34;BSD-like with advertising clause&#34;):
2831
2832 Permission is granted to anyone to use this software for any purpose,
2833 including commercial applications, and to alter it and redistribute
2834 it freely, subject to the following restrictions:
2835
2836 1. Redistributions of source code must retain the above copyright
2837 notice, disclaimer, and this list of conditions.
2838 2. Redistributions in binary form must reproduce the above copyright
2839 notice, disclaimer, and this list of conditions in the documenta-
2840 tion and/or other materials provided with the distribution.
2841 3. All advertising materials mentioning features or use of this
2842 software must display the following acknowledgment:
2843
2844 This product includes software developed by Greg Roelofs
2845 and contributors for the book, &#34;PNG: The Definitive Guide,&#34;
2846 published by O&#39;Reilly and Associates.
2847
2848
2849 LICENSE 2 (GNU GPL v2 or later):
2850
2851 This program is free software; you can redistribute it and/or modify
2852 it under the terms of the GNU General Public License as published by
2853 the Free Software Foundation; either version 2 of the License, or
2854 (at your option) any later version.
2855
2856 This program is distributed in the hope that it will be useful,
2857 but WITHOUT ANY WARRANTY; without even the implied warranty of
2858 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2859 GNU General Public License for more details.
2860
2861 You should have received a copy of the GNU General Public License
2862 along with this program; if not, write to the Free Software Foundation,
2863 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2864
2865 ---------------------------------------------------------------------------*/
2866
2867## Files:
2868scripts/vers.c
2869
2870/* vers.c - define format of libpng.vers
2871 *
2872 * Last changed in libpng version 1.6.16 [December 22, 2014]
2873 * Copyright (c) 2011-2014 Glenn Randers-Pehrson
2874 *
2875 * This code is released under the libpng license.
2876 * For conditions of distribution and use, see the disclaimer
2877 * and license in png.h
2878 */
2879
2880## Files:
2881contrib/gregbook/wpng.c
2882
2883/*---------------------------------------------------------------------------
2884
2885 wpng - simple PNG-writing program wpng.c
2886
2887 This program converts certain NetPBM binary files (grayscale and RGB,
2888 maxval = 255) to PNG. Non-interlaced PNGs are written progressively;
2889 interlaced PNGs are read and written in one memory-intensive blast.
2890
2891 Thanks to Jean-loup Gailly for providing the necessary trick to read
2892 interactive text from the keyboard while stdin is redirected. Thanks
2893 to Cosmin Truta for Cygwin fixes.
2894
2895 NOTE: includes provisional support for PNM type &#34;8&#34; (portable alphamap)
2896 images, presumed to be a 32-bit interleaved RGBA format; no pro-
2897 vision for possible interleaved grayscale+alpha (16-bit) format.
2898 THIS IS UNLIKELY TO BECOME AN OFFICIAL NETPBM ALPHA FORMAT!
2899
2900 to do:
2901 - delete output file if quit before calling any writepng routines
2902 - process backspace with -text option under DOS/Win? (currently get ^H)
2903
2904 ---------------------------------------------------------------------------
2905
2906 Changelog:
2907 - 1.01: initial public release
2908 - 1.02: modified to allow abbreviated options
2909 - 1.03: removed extraneous character from usage screen; fixed bug in
2910 command-line parsing
2911 - 1.04: fixed DOS/OS2/Win32 detection, including partial Cygwin fix
2912 (see http://home.att.net/~perlspinr/diffs/GregBook_cygwin.diff)
2913 - 2.00: dual-licensed (added GNU GPL)
2914 - 2.01: check for integer overflow (Glenn R-P)
2915
2916 [REPORTED BUG (win32 only): &#34;contrib/gregbook/wpng.c - cmd line
2917 dose not work! In order to do something useful I needed to redirect
2918 both input and output, with cygwin and with bcc32 as well. Under
2919 Linux, the same wpng appears to work fine. I don&#39;t know what is
2920 the problem.&#34;]
2921
2922 ---------------------------------------------------------------------------
2923
2924 Copyright (c) 1998-2007, 2017 Greg Roelofs. All rights reserved.
2925
2926 This software is provided &#34;as is,&#34; without warranty of any kind,
2927 express or implied. In no event shall the author or contributors
2928 be held liable for any damages arising in any way from the use of
2929 this software.
2930
2931 The contents of this file are DUAL-LICENSED. You may modify and/or
2932 redistribute this software according to the terms of one of the
2933 following two licenses (at your option):
2934
2935
2936 LICENSE 1 (&#34;BSD-like with advertising clause&#34;):
2937
2938 Permission is granted to anyone to use this software for any purpose,
2939 including commercial applications, and to alter it and redistribute
2940 it freely, subject to the following restrictions:
2941
2942 1. Redistributions of source code must retain the above copyright
2943 notice, disclaimer, and this list of conditions.
2944 2. Redistributions in binary form must reproduce the above copyright
2945 notice, disclaimer, and this list of conditions in the documenta-
2946 tion and/or other materials provided with the distribution.
2947 3. All advertising materials mentioning features or use of this
2948 software must display the following acknowledgment:
2949
2950 This product includes software developed by Greg Roelofs
2951 and contributors for the book, &#34;PNG: The Definitive Guide,&#34;
2952 published by O&#39;Reilly and Associates.
2953
2954
2955 LICENSE 2 (GNU GPL v2 or later):
2956
2957 This program is free software; you can redistribute it and/or modify
2958 it under the terms of the GNU General Public License as published by
2959 the Free Software Foundation; either version 2 of the License, or
2960 (at your option) any later version.
2961
2962 This program is distributed in the hope that it will be useful,
2963 but WITHOUT ANY WARRANTY; without even the implied warranty of
2964 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2965 GNU General Public License for more details.
2966
2967 You should have received a copy of the GNU General Public License
2968 along with this program; if not, write to the Free Software Foundation,
2969 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2970
2971 ---------------------------------------------------------------------------*/
2972
2973## Files:
2974contrib/libtests/pngstest.c
2975
2976/* pngstest.c
2977 *
2978 * Copyright (c) 2021 Cosmin Truta
2979 * Copyright (c) 2013-2017 John Cunningham Bowler
2980 *
2981 * This code is released under the libpng license.
2982 * For conditions of distribution and use, see the disclaimer
2983 * and license in png.h
2984 *
2985 * Test for the PNG &#39;simplified&#39; APIs.
2986 */
2987
2988## Files:
2989ltmain.sh
2990
2991# func_version
2992# ------------
2993# Echo version message to standard output and exit.
2994# The version message is extracted from the calling file&#39;s header
2995# comments, with leading &#39;# &#39; stripped:
2996# 1. First display the progname and version
2997# 2. Followed by the header comment line matching /^# Written by /
2998# 3. Then a blank line followed by the first following line matching
2999# /^# Copyright /
3000# 4. Immediately followed by any lines between the previous matches,
3001# except lines preceding the intervening completely blank line.
3002# For example, see the header comments of this file.
3003
3004## Files:
3005intel/intel_init.c
3006
3007/* intel_init.c - SSE2 optimized filter functions
3008 *
3009 * Copyright (c) 2018 Cosmin Truta
3010 * Copyright (c) 2016-2017 Glenn Randers-Pehrson
3011 * Written by Mike Klein and Matt Sarett, Google, Inc.
3012 * Derived from arm/arm_init.c
3013 *
3014 * This code is released under the libpng license.
3015 * For conditions of distribution and use, see the disclaimer
3016 * and license in png.h
3017 */
3018
3019## Files:
3020contrib/arm-neon/linux.c
3021
3022/* contrib/arm-neon/linux.c
3023 *
3024 * Last changed in libpng 1.6.31 [July 27, 2017]
3025 * Copyright (c) 2014, 2017 Glenn Randers-Pehrson
3026 * Written by John Bowler, 2014, 2017.
3027 *
3028 * This code is released under the libpng license.
3029 * For conditions of distribution and use, see the disclaimer
3030 * and license in png.h
3031 *
3032 * SEE contrib/arm-neon/README before reporting bugs
3033 *
3034 * STATUS: SUPPORTED
3035 * BUG REPORTS: [email protected]
3036 *
3037 * png_have_neon implemented for Linux by reading the widely available
3038 * pseudo-file /proc/cpuinfo.
3039 *
3040 * This code is strict ANSI-C and is probably moderately portable; it does
3041 * however use &lt;stdio.h&gt; and it assumes that /proc/cpuinfo is never localized.
3042 */
3043
3044## Files:
3045contrib/tools/checksum-icc.c
3046
3047/* checksum-icc.c
3048 *
3049 * Copyright (c) 2013 John Cunningham Bowler
3050 *
3051 * Last changed in libpng 1.6.0 [February 14, 2013]
3052 *
3053 * This code is released under the libpng license.
3054 * For conditions of distribution and use, see the disclaimer
3055 * and license in png.h
3056 *
3057 * Generate crc32 and adler32 checksums of the given input files, used to
3058 * generate check-codes for use when matching ICC profiles within libpng.
3059 */
3060
3061## Files:
3062contrib/gregbook/rpng-x.c
3063
3064/*---------------------------------------------------------------------------
3065
3066 rpng - simple PNG display program rpng-x.c
3067
3068 This program decodes and displays PNG images, with gamma correction and
3069 optionally with a user-specified background color (in case the image has
3070 transparency). It is very nearly the most basic PNG viewer possible.
3071 This version is for the X Window System (tested by author under Unix and
3072 by Martin Zinser under OpenVMS; may work under OS/2 with some tweaking).
3073
3074 to do:
3075 - 8-bit (colormapped) X support
3076 - use %.1023s to simplify truncation of title-bar string?
3077
3078 ---------------------------------------------------------------------------
3079
3080 Changelog:
3081 - 1.01: initial public release
3082 - 1.02: modified to allow abbreviated options; fixed long/ulong mis-
3083 match; switched to png_jmpbuf() macro
3084 - 1.10: added support for non-default visuals; fixed X pixel-conversion
3085 - 1.11: added extra set of parentheses to png_jmpbuf() macro; fixed
3086 command-line parsing bug
3087 - 1.12: fixed some small X memory leaks (thanks to Fran�ois Petitjean)
3088 - 1.13: fixed XFreeGC() crash bug (thanks to Patrick Welche)
3089 - 1.14: added support for X resources (thanks to Gerhard Niklasch)
3090 - 2.00: dual-licensed (added GNU GPL)
3091 - 2.01: fixed improper display of usage screen on PNG error(s)
3092 - 2.02: Added &#34;void(argc);&#34; statement to quiet pedantic compiler warnings
3093 about unused variable (GR-P)
3094 - 2.03: check for integer overflow (Glenn R-P)
3095
3096 ---------------------------------------------------------------------------
3097
3098 Copyright (c) 1998-2008, 2017 Greg Roelofs. All rights reserved.
3099
3100 This software is provided &#34;as is,&#34; without warranty of any kind,
3101 express or implied. In no event shall the author or contributors
3102 be held liable for any damages arising in any way from the use of
3103 this software.
3104
3105 The contents of this file are DUAL-LICENSED. You may modify and/or
3106 redistribute this software according to the terms of one of the
3107 following two licenses (at your option):
3108
3109
3110 LICENSE 1 (&#34;BSD-like with advertising clause&#34;):
3111
3112 Permission is granted to anyone to use this software for any purpose,
3113 including commercial applications, and to alter it and redistribute
3114 it freely, subject to the following restrictions:
3115
3116 1. Redistributions of source code must retain the above copyright
3117 notice, disclaimer, and this list of conditions.
3118 2. Redistributions in binary form must reproduce the above copyright
3119 notice, disclaimer, and this list of conditions in the documenta-
3120 tion and/or other materials provided with the distribution.
3121 3. All advertising materials mentioning features or use of this
3122 software must display the following acknowledgment:
3123
3124 This product includes software developed by Greg Roelofs
3125 and contributors for the book, &#34;PNG: The Definitive Guide,&#34;
3126 published by O&#39;Reilly and Associates.
3127
3128
3129 LICENSE 2 (GNU GPL v2 or later):
3130
3131 This program is free software; you can redistribute it and/or modify
3132 it under the terms of the GNU General Public License as published by
3133 the Free Software Foundation; either version 2 of the License, or
3134 (at your option) any later version.
3135
3136 This program is distributed in the hope that it will be useful,
3137 but WITHOUT ANY WARRANTY; without even the implied warranty of
3138 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3139 GNU General Public License for more details.
3140
3141 You should have received a copy of the GNU General Public License
3142 along with this program; if not, write to the Free Software Foundation,
3143 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
3144
3145 ---------------------------------------------------------------------------*/
3146
3147## Files:
3148contrib/libtests/makepng.c
3149
3150/* Copyright: */
3151
3152## Files:
3153contrib/libtests/pngimage.c
3154
3155/* pngimage.c
3156 *
3157 * Copyright (c) 2021 Cosmin Truta
3158 * Copyright (c) 2015,2016 John Cunningham Bowler
3159 *
3160 * This code is released under the libpng license.
3161 * For conditions of distribution and use, see the disclaimer
3162 * and license in png.h
3163 *
3164 * Test the png_read_png and png_write_png interfaces. Given a PNG file load it
3165 * using png_read_png and then write with png_write_png. Test all possible
3166 * transforms.
3167 */
3168
3169## Files:
3170ltmain.sh
3171
3172# This is free software. There is NO warranty; not even for
3173# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
3174#
3175# Copyright (C) 2004-2019, 2021 Bootstrap Authors
3176#
3177# This file is dual licensed under the terms of the MIT license
3178# &lt;https://opensource.org/license/MIT&gt;, and GPL version 2 or later
3179# &lt;http://www.gnu.org/licenses/gpl-2.0.html&gt;. You must apply one of
3180# these licenses when using or redistributing this software or any of
3181# the files within it. See the URLs above, or the file `LICENSE`
3182# included in the Bootstrap distribution for the full license texts.
3183
3184## Files:
3185contrib/visupng/PngFile.h
3186
3187/* and license in png.h*/
3188
3189## Files:
3190contrib/tools/intgamma.sh
3191
3192#!/bin/sh
3193#
3194# intgamma.sh
3195#
3196# Last changed in libpng 1.6.0 [February 14, 2013]
3197#
3198# COPYRIGHT: Written by John Cunningham Bowler, 2013.
3199# To the extent possible under law, the author has waived all copyright and
3200# related or neighboring rights to this work. This work is published from:
3201# United States.
3202#
3203# Shell script to generate png.c 8-bit and 16-bit log tables (see the code in
3204# png.c for details).
3205#
3206# This script uses the &#34;bc&#34; arbitrary precision calculator to calculate 32-bit
3207# fixed point values of logarithms appropriate to finding the log of an 8-bit
3208# (0..255) value and a similar table for the exponent calculation.
3209#
3210# &#34;bc&#34; must be on the path when the script is executed, and the math library
3211# (-lm) must be available
3212#
3213# function to print out a list of numbers as integers; the function truncates
3214# the integers which must be one-per-line
3215
3216## Files:
3217pngwio.c
3218
3219/* pngwio.c - functions for data output
3220 *
3221 * Copyright (c) 2018 Cosmin Truta
3222 * Copyright (c) 1998-2002,2004,2006-2014,2016,2018 Glenn Randers-Pehrson
3223 * Copyright (c) 1996-1997 Andreas Dilger
3224 * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
3225 *
3226 * This code is released under the libpng license.
3227 * For conditions of distribution and use, see the disclaimer
3228 * and license in png.h
3229 *
3230 * This file provides a location for all output. Users who need
3231 * special handling are expected to write functions that have the same
3232 * arguments as these and perform similar functions, but that possibly
3233 * use different output methods. Note that you shouldn&#39;t change these
3234 * functions, but rather write replacement functions and then change
3235 * them at run time with png_set_write_fn(...).
3236 */</pre>
3237 </body>
3238 </topic>
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette