mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
65cb3fd86c
libpng upgrade to 1.6.45 and cICP metadata support for PNG imwrite #27741 ### Pull Request Readiness Checklist resolves #24185 libpng docs: https://www.w3.org/TR/png-3/#cICP-chunk similar code from ffmpeg: https://github.com/FFmpeg/FFmpeg/blob/a700f0f72d1f073e5adcfbb16f4633850b0ef51c/libavcodec/pngenc.c#L452-L456 So issue #24185 can be solved by replacing `cv.imwrite` in user's code to `cv.imwriteWithMetadata`: ```python cv.imwriteWithMetadata("frame.png", frame, [cv.IMAGE_METADATA_CICP], np.array([[9, 18, 0, 1]], np.uint8)) ``` ``` $ exiftool /home/d.kurtaev/opencv_build/frames_pr/image_38.png ExifTool Version Number : 12.76 File Name : image_38.png Directory : /home/d.kurtaev/opencv_build/frames_pr File Size : 3.8 MB File Modification Date/Time : 2025:09:02 20:48:22+03:00 File Access Date/Time : 2025:09:02 20:48:22+03:00 File Inode Change Date/Time : 2025:09:02 20:48:22+03:00 File Permissions : -rw-r--r-- File Type : PNG File Type Extension : png MIME Type : image/png Image Width : 1080 Image Height : 1920 Bit Depth : 8 Color Type : RGB Compression : Deflate/Inflate Filter : Adaptive Interlace : Noninterlaced Color Primaries : BT.2020, BT.2100 Transfer Characteristics : BT.2100 HLG, ARIB STD-B67 Matrix Coefficients : Identity matrix Video Full Range Flag : 1 Image Size : 1080x1920 Megapixels : 2.1 ``` See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake
135 lines
5.2 KiB
Plaintext
135 lines
5.2 KiB
Plaintext
COPYRIGHT NOTICE, DISCLAIMER, and LICENSE
|
|
=========================================
|
|
|
|
PNG Reference Library License version 2
|
|
---------------------------------------
|
|
|
|
* Copyright (c) 1995-2025 The PNG Reference Library Authors.
|
|
* Copyright (c) 2018-2025 Cosmin Truta.
|
|
* Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
|
|
* Copyright (c) 1996-1997 Andreas Dilger.
|
|
* Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
|
|
|
The software is supplied "as is", without warranty of any kind,
|
|
express or implied, including, without limitation, the warranties
|
|
of merchantability, fitness for a particular purpose, title, and
|
|
non-infringement. In no event shall the Copyright owners, or
|
|
anyone distributing the software, be liable for any damages or
|
|
other liability, whether in contract, tort or otherwise, arising
|
|
from, out of, or in connection with the software, or the use or
|
|
other dealings in the software, even if advised of the possibility
|
|
of such damage.
|
|
|
|
Permission is hereby granted to use, copy, modify, and distribute
|
|
this software, or portions hereof, for any purpose, without fee,
|
|
subject to the following restrictions:
|
|
|
|
1. The origin of this software must not be misrepresented; you
|
|
must not claim that you wrote the original software. If you
|
|
use this software in a product, an acknowledgment in the product
|
|
documentation would be appreciated, but is not required.
|
|
|
|
2. Altered source versions must be plainly marked as such, and must
|
|
not be misrepresented as being the original software.
|
|
|
|
3. This Copyright notice may not be removed or altered from any
|
|
source or altered source distribution.
|
|
|
|
|
|
PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35)
|
|
-----------------------------------------------------------------------
|
|
|
|
libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are
|
|
Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are
|
|
derived from libpng-1.0.6, and are distributed according to the same
|
|
disclaimer and license as libpng-1.0.6 with the following individuals
|
|
added to the list of Contributing Authors:
|
|
|
|
Simon-Pierre Cadieux
|
|
Eric S. Raymond
|
|
Mans Rullgard
|
|
Cosmin Truta
|
|
Gilles Vollant
|
|
James Yu
|
|
Mandar Sahastrabuddhe
|
|
Google Inc.
|
|
Vadim Barkov
|
|
|
|
and with the following additions to the disclaimer:
|
|
|
|
There is no warranty against interference with your enjoyment of
|
|
the library or against infringement. There is no warranty that our
|
|
efforts or the library will fulfill any of your particular purposes
|
|
or needs. This library is provided with all faults, and the entire
|
|
risk of satisfactory quality, performance, accuracy, and effort is
|
|
with the user.
|
|
|
|
Some files in the "contrib" directory and some configure-generated
|
|
files that are distributed with libpng have other copyright owners, and
|
|
are released under other open source licenses.
|
|
|
|
libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
|
|
Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from
|
|
libpng-0.96, and are distributed according to the same disclaimer and
|
|
license as libpng-0.96, with the following individuals added to the
|
|
list of Contributing Authors:
|
|
|
|
Tom Lane
|
|
Glenn Randers-Pehrson
|
|
Willem van Schaik
|
|
|
|
libpng versions 0.89, June 1996, through 0.96, May 1997, are
|
|
Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88,
|
|
and are distributed according to the same disclaimer and license as
|
|
libpng-0.88, with the following individuals added to the list of
|
|
Contributing Authors:
|
|
|
|
John Bowler
|
|
Kevin Bracey
|
|
Sam Bushell
|
|
Magnus Holmgren
|
|
Greg Roelofs
|
|
Tom Tanner
|
|
|
|
Some files in the "scripts" directory have other copyright owners,
|
|
but are released under this license.
|
|
|
|
libpng versions 0.5, May 1995, through 0.88, January 1996, are
|
|
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
|
|
|
|
For the purposes of this copyright and license, "Contributing Authors"
|
|
is defined as the following set of individuals:
|
|
|
|
Andreas Dilger
|
|
Dave Martindale
|
|
Guy Eric Schalnat
|
|
Paul Schmidt
|
|
Tim Wegner
|
|
|
|
The PNG Reference Library is supplied "AS IS". The Contributing
|
|
Authors and Group 42, Inc. disclaim all warranties, expressed or
|
|
implied, including, without limitation, the warranties of
|
|
merchantability and of fitness for any purpose. The Contributing
|
|
Authors and Group 42, Inc. assume no liability for direct, indirect,
|
|
incidental, special, exemplary, or consequential damages, which may
|
|
result from the use of the PNG Reference Library, even if advised of
|
|
the possibility of such damage.
|
|
|
|
Permission is hereby granted to use, copy, modify, and distribute this
|
|
source code, or portions hereof, for any purpose, without fee, subject
|
|
to the following restrictions:
|
|
|
|
1. The origin of this source code must not be misrepresented.
|
|
|
|
2. Altered versions must be plainly marked as such and must not
|
|
be misrepresented as being the original source.
|
|
|
|
3. This Copyright notice may not be removed or altered from any
|
|
source or altered source distribution.
|
|
|
|
The Contributing Authors and Group 42, Inc. specifically permit,
|
|
without fee, and encourage the use of this source code as a component
|
|
to supporting the PNG file format in commercial products. If you use
|
|
this source code in a product, acknowledgment is not required but would
|
|
be appreciated.
|