2011-10-04 19:11:15 +02:00
|
|
|
<!--
|
|
|
|
|
2011-10-05 00:11:43 +02:00
|
|
|
Although you may be viewing an alternate representation, this document
|
|
|
|
is sourced in Markdown, a light-duty markup scheme, and is optimized for
|
2021-11-17 20:16:58 +01:00
|
|
|
the [kramdown](https://kramdown.gettalong.org/) transformer.
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2022-02-14 12:19:52 +01:00
|
|
|
See the accompanying specs_generation.md. External link targets are referenced
|
|
|
|
at the end of this file.
|
2011-10-04 19:11:15 +02:00
|
|
|
|
|
|
|
-->
|
|
|
|
|
2011-10-04 20:02:15 +02:00
|
|
|
|
|
|
|
WebP Container Specification
|
|
|
|
============================
|
2011-10-04 19:11:15 +02:00
|
|
|
|
|
|
|
* TOC placeholder
|
|
|
|
{:toc}
|
|
|
|
|
|
|
|
|
2011-10-04 20:02:15 +02:00
|
|
|
Introduction
|
|
|
|
------------
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2023-05-26 20:58:06 +02:00
|
|
|
WebP is an image format that uses either (i) the VP8 key frame encoding to
|
2023-06-03 04:52:36 +02:00
|
|
|
compress image data in a lossy way or (ii) the WebP lossless encoding. These
|
2023-06-13 07:03:01 +02:00
|
|
|
encoding schemes should make it more efficient than older formats, such as JPEG,
|
|
|
|
GIF, and PNG. It is optimized for fast image transfer over the network (for
|
2023-05-27 00:19:35 +02:00
|
|
|
example, for websites). The WebP format has feature parity (color profile,
|
|
|
|
metadata, animation, etc.) with other formats as well. This document describes
|
|
|
|
the structure of a WebP file.
|
2011-10-04 21:03:53 +02:00
|
|
|
|
2023-05-26 20:56:24 +02:00
|
|
|
The WebP container (that is, the RIFF container for WebP) allows feature support
|
|
|
|
over and above the basic use case of WebP (that is, a file containing a single
|
|
|
|
image encoded as a VP8 key frame). The WebP container provides additional
|
2023-06-03 04:52:36 +02:00
|
|
|
support for the following:
|
2011-10-04 21:03:53 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
* Lossless Compression: An image can be losslessly compressed, using the
|
2012-06-22 01:03:20 +02:00
|
|
|
WebP Lossless Format.
|
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
* Metadata: An image may have metadata stored in Exchangeable Image File
|
|
|
|
Format (Exif) or Extensible Metadata Platform (XMP) format.
|
2012-10-31 00:00:45 +01:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
* Transparency: An image may have transparency, that is, an alpha channel.
|
2011-10-04 21:03:53 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
* Color Profile: An image may have an embedded ICC profile as described
|
2012-10-30 23:58:54 +01:00
|
|
|
by the [International Color Consortium][iccspec].
|
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
* Animation: An image may have multiple frames with pauses between them,
|
2012-11-02 23:59:39 +01:00
|
|
|
making it an animation.
|
|
|
|
|
2023-07-28 01:18:57 +02:00
|
|
|
Terminology & Basics
|
|
|
|
--------------------
|
|
|
|
|
2022-08-02 03:37:19 +02:00
|
|
|
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
|
|
|
|
"SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this
|
|
|
|
document are to be interpreted as described in BCP 14 [RFC 2119][] [RFC 8174][]
|
|
|
|
when, and only when, they appear in all capitals, as shown here.
|
2012-02-08 00:06:32 +01:00
|
|
|
|
2023-05-26 20:56:24 +02:00
|
|
|
A WebP file contains either a still image (that is, an encoded matrix of pixels)
|
2012-11-12 20:34:08 +01:00
|
|
|
or an [animation](#animation). Optionally, it can also contain transparency
|
2023-06-03 04:52:36 +02:00
|
|
|
information, a color profile and metadata. We refer to the matrix of pixels as
|
|
|
|
the _canvas_ of the image.
|
2011-10-04 17:53:54 +02:00
|
|
|
|
2023-07-28 01:18:57 +02:00
|
|
|
Bit numbering in chunk diagrams starts at `0` for the most significant bit
|
|
|
|
('MSB 0'), as described in [RFC 1166][].
|
|
|
|
|
2011-10-05 00:11:43 +02:00
|
|
|
Below are additional terms used throughout this document:
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-10-31 00:06:36 +01:00
|
|
|
_Reader/Writer_
|
|
|
|
|
|
|
|
: Code that reads WebP files is referred to as a _reader_, while code that
|
2015-02-06 23:50:49 +01:00
|
|
|
writes them is referred to as a _writer_.
|
2012-02-08 00:06:32 +01:00
|
|
|
|
|
|
|
_uint16_
|
|
|
|
|
|
|
|
: A 16-bit, little-endian, unsigned integer.
|
|
|
|
|
2012-06-22 01:03:20 +02:00
|
|
|
_uint24_
|
|
|
|
|
|
|
|
: A 24-bit, little-endian, unsigned integer.
|
|
|
|
|
2012-02-08 00:06:32 +01:00
|
|
|
_uint32_
|
|
|
|
|
|
|
|
: A 32-bit, little-endian, unsigned integer.
|
|
|
|
|
2013-03-26 22:48:51 +01:00
|
|
|
_FourCC_
|
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
: A four-character code (FourCC) is a _uint32_ created by concatenating four
|
2022-09-30 03:48:04 +02:00
|
|
|
ASCII characters in little-endian order. This means 'aaaa' (0x61616161) and
|
|
|
|
'AAAA' (0x41414141) are treated as different _FourCCs_.
|
2013-03-26 22:48:51 +01:00
|
|
|
|
2012-06-22 01:03:20 +02:00
|
|
|
_1-based_
|
2012-10-31 00:06:36 +01:00
|
|
|
|
2023-05-26 20:56:24 +02:00
|
|
|
: An unsigned integer field storing values offset by `-1`, for example, such a
|
|
|
|
field would store value _25_ as _24_.
|
2012-06-22 01:03:20 +02:00
|
|
|
|
2022-08-02 03:58:02 +02:00
|
|
|
_ChunkHeader('ABCD')_
|
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
: Used to describe the _FourCC_ and _Chunk Size_ header of individual chunks,
|
|
|
|
where 'ABCD' is the FourCC for the chunk. This element's size is 8 bytes.
|
2022-08-02 03:58:02 +02:00
|
|
|
|
2015-02-06 23:50:49 +01:00
|
|
|
|
|
|
|
RIFF File Format
|
2013-03-26 22:48:51 +01:00
|
|
|
----------------
|
2015-02-06 23:50:49 +01:00
|
|
|
|
2022-01-26 03:36:36 +01:00
|
|
|
The WebP file format is based on the RIFF (Resource Interchange File Format)
|
2013-03-26 22:48:51 +01:00
|
|
|
document format.
|
|
|
|
|
2012-02-08 00:06:32 +01:00
|
|
|
The basic element of a RIFF file is a _chunk_. It consists of:
|
|
|
|
|
|
|
|
0 1 2 3
|
|
|
|
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
| Chunk FourCC |
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
| Chunk Size |
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
2022-08-02 03:44:26 +02:00
|
|
|
: Chunk Payload :
|
2012-02-08 00:06:32 +01:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-02-08 00:06:32 +01:00
|
|
|
Chunk FourCC: 32 bits
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2013-03-26 22:48:51 +01:00
|
|
|
: ASCII four-character code used for chunk identification.
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-02-08 00:06:32 +01:00
|
|
|
Chunk Size: 32 bits (_uint32_)
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2022-09-27 02:27:42 +02:00
|
|
|
: The size of the chunk in bytes, not including this field, the chunk
|
2023-06-03 04:52:36 +02:00
|
|
|
identifier, or padding.
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-02-08 00:06:32 +01:00
|
|
|
Chunk Payload: _Chunk Size_ bytes
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
: The data payload. If _Chunk Size_ is odd, a single padding byte -- which MUST
|
2022-09-27 02:31:05 +02:00
|
|
|
be `0` to conform with RIFF -- is added.
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2013-03-26 22:48:51 +01:00
|
|
|
**Note:** RIFF has a convention that all-uppercase chunk FourCCs are standard
|
|
|
|
chunks that apply to any RIFF file format, while FourCCs specific to a file
|
|
|
|
format are all lowercase. WebP does not follow this convention.
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2015-02-06 23:50:49 +01:00
|
|
|
|
|
|
|
WebP File Header
|
2012-02-08 00:06:32 +01:00
|
|
|
----------------
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-02-08 00:06:32 +01:00
|
|
|
0 1 2 3
|
|
|
|
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
| 'R' | 'I' | 'F' | 'F' |
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
| File Size |
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
| 'W' | 'E' | 'B' | 'P' |
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-02-08 00:06:32 +01:00
|
|
|
'RIFF': 32 bits
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
: The ASCII characters 'R', 'I', 'F', 'F'.
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-02-08 00:06:32 +01:00
|
|
|
File Size: 32 bits (_uint32_)
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
: The size of the file in bytes, starting at offset 8. The maximum value of
|
2015-02-06 23:50:49 +01:00
|
|
|
this field is 2^32 minus 10 bytes and thus the size of the whole file is at
|
2023-06-03 04:52:36 +02:00
|
|
|
most 4 GiB minus 2 bytes.
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-02-08 00:06:32 +01:00
|
|
|
'WEBP': 32 bits
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
: The ASCII characters 'W', 'E', 'B', 'P'.
|
2011-10-04 17:53:54 +02:00
|
|
|
|
2013-03-26 22:48:51 +01:00
|
|
|
A WebP file MUST begin with a RIFF header with the FourCC 'WEBP'. The file size
|
|
|
|
in the header is the total size of the chunks that follow plus `4` bytes for
|
2022-09-27 02:28:54 +02:00
|
|
|
the 'WEBP' FourCC. The file SHOULD NOT contain any data after the data
|
|
|
|
specified by _File Size_. Readers MAY parse such files, ignoring the trailing
|
|
|
|
data. As the size of any chunk is even, the size given by the RIFF header is
|
2023-05-26 20:57:25 +02:00
|
|
|
also even. The contents of individual chunks are described in the following
|
2022-09-27 02:28:54 +02:00
|
|
|
sections.
|
2013-03-26 22:48:51 +01:00
|
|
|
|
2015-02-06 23:50:49 +01:00
|
|
|
|
|
|
|
Simple File Format (Lossy)
|
2012-06-22 01:03:20 +02:00
|
|
|
--------------------------
|
|
|
|
|
|
|
|
This layout SHOULD be used if the image requires _lossy_ encoding and does not
|
|
|
|
require transparency or other advanced features provided by the extended format.
|
|
|
|
Files with this layout are smaller and supported by older software.
|
|
|
|
|
2012-07-18 21:16:51 +02:00
|
|
|
Simple WebP (lossy) file format:
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-02-08 00:06:32 +01:00
|
|
|
0 1 2 3
|
|
|
|
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
2022-08-02 03:44:26 +02:00
|
|
|
| |
|
2012-02-08 00:06:32 +01:00
|
|
|
| WebP file header (12 bytes) |
|
2022-08-02 03:44:26 +02:00
|
|
|
| |
|
2012-02-08 00:06:32 +01:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
2023-06-03 04:55:46 +02:00
|
|
|
: 'VP8 ' Chunk :
|
2012-06-22 01:03:20 +02:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
|
2023-06-03 04:55:46 +02:00
|
|
|
'VP8 ' Chunk:
|
2012-06-22 01:03:20 +02:00
|
|
|
|
|
|
|
0 1 2 3
|
|
|
|
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
2012-02-08 00:06:32 +01:00
|
|
|
| ChunkHeader('VP8 ') |
|
2022-08-02 03:44:26 +02:00
|
|
|
| |
|
2012-02-08 00:06:32 +01:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
2022-08-02 03:44:26 +02:00
|
|
|
: VP8 data :
|
2012-02-08 00:06:32 +01:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-02-08 00:06:32 +01:00
|
|
|
VP8 data: _Chunk Size_ bytes
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-02-08 00:06:32 +01:00
|
|
|
: VP8 bitstream data.
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
Note that the fourth character in the 'VP8 ' FourCC is an ASCII space (0x20).
|
2022-08-02 03:50:17 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
The VP8 bitstream format specification is described in [VP8 Data Format and
|
|
|
|
Decoding Guide][rfc 6386]. Note that the VP8 frame header contains the VP8 frame
|
2012-06-22 01:03:20 +02:00
|
|
|
width and height. That is assumed to be the width and height of the canvas.
|
2011-10-04 17:53:54 +02:00
|
|
|
|
2022-08-02 04:06:01 +02:00
|
|
|
The VP8 specification describes how to decode the image into Y'CbCr format. To
|
2023-06-03 04:52:36 +02:00
|
|
|
convert to RGB, [Recommendation BT.601][rec601] SHOULD be used. Applications MAY
|
|
|
|
use another conversion method, but visual results may differ among decoders.
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2015-02-06 23:50:49 +01:00
|
|
|
|
|
|
|
Simple File Format (Lossless)
|
2012-06-22 01:03:20 +02:00
|
|
|
-----------------------------
|
|
|
|
|
|
|
|
**Note:** Older readers may not support files using the lossless format.
|
|
|
|
|
|
|
|
This layout SHOULD be used if the image requires _lossless_ encoding (with an
|
|
|
|
optional transparency channel) and does not require advanced features provided
|
|
|
|
by the extended format.
|
|
|
|
|
2012-07-18 21:16:51 +02:00
|
|
|
Simple WebP (lossless) file format:
|
2012-06-22 01:03:20 +02:00
|
|
|
|
|
|
|
0 1 2 3
|
|
|
|
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
2022-08-02 03:44:26 +02:00
|
|
|
| |
|
2012-06-22 01:03:20 +02:00
|
|
|
| WebP file header (12 bytes) |
|
2022-08-02 03:44:26 +02:00
|
|
|
| |
|
2012-06-22 01:03:20 +02:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
2023-06-03 04:55:46 +02:00
|
|
|
: 'VP8L' Chunk :
|
2012-06-22 01:03:20 +02:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
|
2023-06-03 04:55:46 +02:00
|
|
|
'VP8L' Chunk:
|
2012-06-22 01:03:20 +02:00
|
|
|
|
|
|
|
0 1 2 3
|
|
|
|
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
| ChunkHeader('VP8L') |
|
2022-08-02 03:44:26 +02:00
|
|
|
| |
|
2012-06-22 01:03:20 +02:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
2022-08-02 03:44:26 +02:00
|
|
|
: VP8L data :
|
2012-06-22 01:03:20 +02:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
|
|
|
|
VP8L data: _Chunk Size_ bytes
|
|
|
|
|
|
|
|
: VP8L bitstream data.
|
|
|
|
|
|
|
|
The current specification of the VP8L bitstream can be found at
|
|
|
|
[WebP Lossless Bitstream Format][webpllspec]. Note that the VP8L header
|
|
|
|
contains the VP8L image width and height. That is assumed to be the width
|
|
|
|
and height of the canvas.
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2015-02-06 23:50:49 +01:00
|
|
|
|
|
|
|
Extended File Format
|
2012-02-08 00:06:32 +01:00
|
|
|
--------------------
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-02-08 00:06:32 +01:00
|
|
|
**Note:** Older readers may not support files using the extended format.
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-02-08 00:06:32 +01:00
|
|
|
An extended format file consists of:
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2023-06-03 04:55:46 +02:00
|
|
|
* A 'VP8X' Chunk with information about features used in the file.
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2023-06-03 04:55:46 +02:00
|
|
|
* An optional 'ICCP' Chunk with a color profile.
|
2012-10-30 23:58:54 +01:00
|
|
|
|
2023-06-03 04:55:46 +02:00
|
|
|
* An optional 'ANIM' Chunk with animation control data.
|
2012-11-02 23:59:39 +01:00
|
|
|
|
|
|
|
* Image data.
|
2012-10-31 00:06:36 +01:00
|
|
|
|
2023-06-03 04:55:46 +02:00
|
|
|
* An optional 'EXIF' Chunk with Exif metadata.
|
2012-10-31 00:06:36 +01:00
|
|
|
|
2023-06-03 04:55:46 +02:00
|
|
|
* An optional 'XMP ' Chunk with XMP metadata.
|
2012-10-31 00:06:36 +01:00
|
|
|
|
2021-10-22 21:15:24 +02:00
|
|
|
* An optional list of [unknown chunks](#unknown-chunks).
|
2012-11-12 20:34:08 +01:00
|
|
|
|
2015-07-22 20:55:49 +02:00
|
|
|
For a _still image_, the _image data_ consists of a single frame, which is made
|
|
|
|
up of:
|
|
|
|
|
|
|
|
* An optional [alpha subchunk](#alpha).
|
|
|
|
|
|
|
|
* A [bitstream subchunk](#bitstream-vp8vp8l).
|
|
|
|
|
|
|
|
For an _animated image_, the _image data_ consists of multiple frames. More
|
|
|
|
details about frames can be found in the [Animation](#animation) section.
|
2012-06-22 01:03:20 +02:00
|
|
|
|
2024-03-11 22:01:40 +01:00
|
|
|
All chunks necessary for reconstruction and color correction, that is 'VP8X',
|
|
|
|
'ICCP', 'ANIM', 'ANMF', 'ALPH', 'VP8' and 'VP8L', MUST appear in the order
|
2024-03-13 00:20:00 +01:00
|
|
|
described earlier. Readers SHOULD fail when chunks necessary for reconstruction
|
2024-03-11 22:01:40 +01:00
|
|
|
and color correction are out of order.
|
|
|
|
|
|
|
|
[Metadata](#metadata) and [unknown](#unknown-chunks) chunks MAY appear out of
|
|
|
|
order.
|
|
|
|
|
|
|
|
**Rationale:** The chunks necessary for reconstruction should appear first in
|
|
|
|
the file to allow a reader to begin decoding an image before receiving all of
|
|
|
|
the data. An application may benefit from varying the order of metadata and
|
|
|
|
custom chunks to suit the implementation.
|
2011-10-04 17:53:54 +02:00
|
|
|
|
2012-02-08 00:06:32 +01:00
|
|
|
Extended WebP file header:
|
2012-10-31 00:06:36 +01:00
|
|
|
{:#extended_header}
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-02-08 00:06:32 +01:00
|
|
|
0 1 2 3
|
|
|
|
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
2022-08-02 03:44:26 +02:00
|
|
|
| |
|
2012-02-08 00:06:32 +01:00
|
|
|
| WebP file header (12 bytes) |
|
2022-08-02 03:44:26 +02:00
|
|
|
| |
|
2012-02-08 00:06:32 +01:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
| ChunkHeader('VP8X') |
|
2022-08-02 03:44:26 +02:00
|
|
|
| |
|
2012-02-08 00:06:32 +01:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
2014-12-20 02:43:55 +01:00
|
|
|
|Rsv|I|L|E|X|A|R| Reserved |
|
2012-02-08 00:06:32 +01:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
2012-07-03 14:42:13 +02:00
|
|
|
| Canvas Width Minus One | ...
|
2012-02-08 00:06:32 +01:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
2012-07-03 14:42:13 +02:00
|
|
|
... Canvas Height Minus One |
|
2012-06-22 01:03:20 +02:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-11-02 23:27:37 +01:00
|
|
|
Reserved (Rsv): 2 bits
|
2011-10-04 20:02:15 +02:00
|
|
|
|
2022-10-10 23:05:04 +02:00
|
|
|
: MUST be `0`. Readers MUST ignore this field.
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2013-03-14 02:16:30 +01:00
|
|
|
ICC profile (I): 1 bit
|
2012-10-31 00:00:45 +01:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
: Set if the file contains an 'ICCP' Chunk.
|
2012-10-31 00:00:45 +01:00
|
|
|
|
2012-05-24 21:33:48 +02:00
|
|
|
Alpha (L): 1 bit
|
2012-05-23 11:31:25 +02:00
|
|
|
|
2012-10-31 00:06:36 +01:00
|
|
|
: Set if any of the frames of the image contain transparency information
|
2015-02-06 23:50:49 +01:00
|
|
|
("alpha").
|
2012-05-23 11:31:25 +02:00
|
|
|
|
2022-01-26 03:36:36 +01:00
|
|
|
Exif metadata (E): 1 bit
|
2012-10-30 23:58:54 +01:00
|
|
|
|
2022-01-26 03:36:36 +01:00
|
|
|
: Set if the file contains Exif metadata.
|
2012-10-30 23:58:54 +01:00
|
|
|
|
2013-03-14 02:16:30 +01:00
|
|
|
XMP metadata (X): 1 bit
|
2012-11-02 23:27:37 +01:00
|
|
|
|
|
|
|
: Set if the file contains XMP metadata.
|
|
|
|
|
2013-03-14 02:16:30 +01:00
|
|
|
Animation (A): 1 bit
|
2012-07-13 21:16:16 +02:00
|
|
|
|
2023-06-03 04:55:46 +02:00
|
|
|
: Set if this is an animated image. Data in 'ANIM' and 'ANMF' Chunks should be
|
2015-02-06 23:50:49 +01:00
|
|
|
used to control the animation.
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2014-12-20 02:43:55 +01:00
|
|
|
Reserved (R): 1 bit
|
2012-10-31 00:06:36 +01:00
|
|
|
|
2022-10-10 23:05:04 +02:00
|
|
|
: MUST be `0`. Readers MUST ignore this field.
|
2012-10-31 00:06:36 +01:00
|
|
|
|
2012-05-23 11:31:25 +02:00
|
|
|
Reserved: 24 bits
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2022-10-10 23:05:04 +02:00
|
|
|
: MUST be `0`. Readers MUST ignore this field.
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-07-03 14:42:13 +02:00
|
|
|
Canvas Width Minus One: 24 bits
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-06-22 01:03:20 +02:00
|
|
|
: _1-based_ width of the canvas in pixels.
|
2022-01-26 03:36:36 +01:00
|
|
|
The actual canvas width is `1 + Canvas Width Minus One`.
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-07-03 14:42:13 +02:00
|
|
|
Canvas Height Minus One: 24 bits
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-06-22 01:03:20 +02:00
|
|
|
: _1-based_ height of the canvas in pixels.
|
2022-01-26 03:36:36 +01:00
|
|
|
The actual canvas height is `1 + Canvas Height Minus One`.
|
2011-10-04 20:02:15 +02:00
|
|
|
|
2012-07-03 14:42:13 +02:00
|
|
|
The product of _Canvas Width_ and _Canvas Height_ MUST be at most `2^32 - 1`.
|
2012-06-22 01:03:20 +02:00
|
|
|
|
2022-09-27 04:18:00 +02:00
|
|
|
Future specifications may add more fields. Unknown fields MUST be ignored.
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-02-08 00:06:32 +01:00
|
|
|
### Chunks
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2013-03-14 02:16:30 +01:00
|
|
|
#### Animation
|
2012-11-02 23:59:39 +01:00
|
|
|
|
2023-06-03 04:55:46 +02:00
|
|
|
An animation is controlled by 'ANIM' and 'ANMF' Chunks.
|
2012-11-02 23:59:39 +01:00
|
|
|
|
2023-06-03 04:55:46 +02:00
|
|
|
'ANIM' Chunk:
|
2013-03-27 01:22:18 +01:00
|
|
|
{:#anim_chunk}
|
2012-11-02 23:59:39 +01:00
|
|
|
|
|
|
|
For an animated image, this chunk contains the _global parameters_ of the
|
|
|
|
animation.
|
|
|
|
|
|
|
|
0 1 2 3
|
|
|
|
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
| ChunkHeader('ANIM') |
|
2022-08-02 03:44:26 +02:00
|
|
|
| |
|
2012-11-02 23:59:39 +01:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
| Background Color |
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
| Loop Count |
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
|
|
|
|
Background Color: 32 bits (_uint32_)
|
|
|
|
|
2013-03-27 01:22:18 +01:00
|
|
|
: The default background color of the canvas in \[Blue, Green, Red, Alpha\]
|
2015-02-06 23:50:49 +01:00
|
|
|
byte order. This color MAY be used to fill the unused space on the canvas
|
|
|
|
around the frames, as well as the transparent pixels of the first frame.
|
2023-06-03 04:52:36 +02:00
|
|
|
The background color is also used when the Disposal method is `1`.
|
2013-03-27 01:22:18 +01:00
|
|
|
|
2013-06-26 19:36:55 +02:00
|
|
|
**Note**:
|
2013-06-21 02:38:08 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
* The background color MAY contain a non-opaque alpha value, even if the
|
|
|
|
_Alpha_ flag in the ['VP8X' Chunk](#extended_header) is unset.
|
2013-06-21 02:38:08 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
* Viewer applications SHOULD treat the background color value as a hint and
|
2013-06-26 19:36:55 +02:00
|
|
|
are not required to use it.
|
2012-11-02 23:59:39 +01:00
|
|
|
|
2015-02-05 03:07:00 +01:00
|
|
|
* The canvas is cleared at the start of each loop. The background color MAY be
|
|
|
|
used to achieve this.
|
|
|
|
|
2012-11-02 23:59:39 +01:00
|
|
|
Loop Count: 16 bits (_uint16_)
|
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
: The number of times to loop the animation. If it is `0`, this means
|
|
|
|
infinitely.
|
2012-11-02 23:59:39 +01:00
|
|
|
|
2023-06-03 04:55:46 +02:00
|
|
|
This chunk MUST appear if the _Animation_ flag in the 'VP8X' Chunk is set.
|
2022-09-27 04:19:36 +02:00
|
|
|
If the _Animation_ flag is not set and this chunk is present, it MUST be
|
|
|
|
ignored.
|
2012-11-02 23:59:39 +01:00
|
|
|
|
2023-06-03 04:55:46 +02:00
|
|
|
'ANMF' Chunk:
|
2012-11-02 23:59:39 +01:00
|
|
|
|
|
|
|
For animated images, this chunk contains information about a _single_ frame.
|
|
|
|
If the _Animation flag_ is not set, then this chunk SHOULD NOT be present.
|
|
|
|
|
|
|
|
0 1 2 3
|
|
|
|
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
| ChunkHeader('ANMF') |
|
2022-08-02 03:44:26 +02:00
|
|
|
| |
|
2012-11-02 23:59:39 +01:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
| Frame X | ...
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
... Frame Y | Frame Width Minus One ...
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
... | Frame Height Minus One |
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
2013-08-09 23:02:39 +02:00
|
|
|
| Frame Duration | Reserved |B|D|
|
2012-11-02 23:59:39 +01:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
2022-08-02 03:44:26 +02:00
|
|
|
: Frame Data :
|
2012-11-02 23:59:39 +01:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
|
|
|
|
Frame X: 24 bits (_uint24_)
|
|
|
|
|
2022-01-26 03:36:36 +01:00
|
|
|
: The X coordinate of the upper left corner of the frame is `Frame X * 2`.
|
2012-11-02 23:59:39 +01:00
|
|
|
|
|
|
|
Frame Y: 24 bits (_uint24_)
|
|
|
|
|
2022-01-26 03:36:36 +01:00
|
|
|
: The Y coordinate of the upper left corner of the frame is `Frame Y * 2`.
|
2012-11-02 23:59:39 +01:00
|
|
|
|
|
|
|
Frame Width Minus One: 24 bits (_uint24_)
|
|
|
|
|
|
|
|
: The _1-based_ width of the frame.
|
2022-01-26 03:36:36 +01:00
|
|
|
The frame width is `1 + Frame Width Minus One`.
|
2012-11-02 23:59:39 +01:00
|
|
|
|
|
|
|
Frame Height Minus One: 24 bits (_uint24_)
|
|
|
|
|
|
|
|
: The _1-based_ height of the frame.
|
2022-01-26 03:36:36 +01:00
|
|
|
The frame height is `1 + Frame Height Minus One`.
|
2012-11-02 23:59:39 +01:00
|
|
|
|
|
|
|
Frame Duration: 24 bits (_uint24_)
|
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
: The time to wait before displaying the next frame, in 1-millisecond units.
|
|
|
|
Note that the interpretation of the Frame Duration of 0 (and often <= 10) is
|
|
|
|
defined by the implementation. Many tools and browsers assign a minimum
|
|
|
|
duration similar to GIF.
|
2012-11-02 23:59:39 +01:00
|
|
|
|
2013-08-09 23:02:39 +02:00
|
|
|
Reserved: 6 bits
|
2012-11-02 23:59:39 +01:00
|
|
|
|
2022-10-10 23:05:04 +02:00
|
|
|
: MUST be `0`. Readers MUST ignore this field.
|
2012-11-02 23:59:39 +01:00
|
|
|
|
2013-08-09 23:02:39 +02:00
|
|
|
Blending method (B): 1 bit
|
|
|
|
|
2015-02-06 23:50:49 +01:00
|
|
|
: Indicates how transparent pixels of _the current frame_ are to be blended
|
|
|
|
with corresponding pixels of the previous canvas:
|
2013-08-09 23:02:39 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
* `0`: Use alpha-blending. After disposing of the previous frame, render the
|
2015-02-06 23:50:49 +01:00
|
|
|
current frame on the canvas using [alpha-blending](#alpha-blending). If
|
2023-06-03 04:52:36 +02:00
|
|
|
the current frame does not have an alpha channel, assume the alpha value
|
|
|
|
is 255, effectively replacing the rectangle.
|
2013-08-09 23:02:39 +02:00
|
|
|
|
2015-02-06 23:50:49 +01:00
|
|
|
* `1`: Do not blend. After disposing of the previous frame, render the
|
|
|
|
current frame on the canvas by overwriting the rectangle covered by the
|
|
|
|
current frame.
|
2013-08-09 23:02:39 +02:00
|
|
|
|
2012-11-02 23:59:39 +01:00
|
|
|
Disposal method (D): 1 bit
|
|
|
|
|
2015-02-06 23:50:49 +01:00
|
|
|
: Indicates how _the current frame_ is to be treated after it has been
|
|
|
|
displayed (before rendering the next frame) on the canvas:
|
2012-11-02 23:59:39 +01:00
|
|
|
|
2015-02-06 23:50:49 +01:00
|
|
|
* `0`: Do not dispose. Leave the canvas as is.
|
2012-11-02 23:59:39 +01:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
* `1`: Dispose to the background color. Fill the _rectangle_ on the canvas
|
|
|
|
covered by the _current frame_ with the background color specified in the
|
|
|
|
['ANIM' Chunk](#anim_chunk).
|
2013-03-27 06:54:47 +01:00
|
|
|
|
|
|
|
**Notes**:
|
|
|
|
|
|
|
|
* The frame disposal only applies to the _frame rectangle_, that is, the
|
2023-06-03 04:52:36 +02:00
|
|
|
rectangle defined by _Frame X_, _Frame Y_, _frame width_, and _frame
|
|
|
|
height_. It may or may not cover the whole canvas.
|
2013-03-27 06:54:47 +01:00
|
|
|
|
|
|
|
{:#alpha-blending}
|
2023-06-03 04:52:36 +02:00
|
|
|
* Alpha-blending:
|
2013-03-27 06:54:47 +01:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
Given that each of the R, G, B, and A channels is 8 bits, and the RGB
|
2013-03-27 06:54:47 +01:00
|
|
|
channels are _not premultiplied_ by alpha, the formula for blending
|
|
|
|
'dst' onto 'src' is:
|
|
|
|
|
|
|
|
~~~~~
|
|
|
|
blend.A = src.A + dst.A * (1 - src.A / 255)
|
|
|
|
if blend.A = 0 then
|
|
|
|
blend.RGB = 0
|
|
|
|
else
|
2022-08-05 04:28:16 +02:00
|
|
|
blend.RGB =
|
|
|
|
(src.RGB * src.A +
|
|
|
|
dst.RGB * dst.A * (1 - src.A / 255)) / blend.A
|
2013-03-27 06:54:47 +01:00
|
|
|
~~~~~
|
|
|
|
|
|
|
|
* Alpha-blending SHOULD be done in linear color space, by taking into account
|
|
|
|
the [color profile](#color-profile) of the image. If the color profile is
|
2023-06-03 04:52:36 +02:00
|
|
|
not present, standard RGB (sRGB) is to be assumed. (Note that sRGB also
|
|
|
|
needs to be linearized due to a gamma of ~2.2.)
|
2012-11-02 23:59:39 +01:00
|
|
|
|
|
|
|
Frame Data: _Chunk Size_ - `16` bytes
|
|
|
|
|
2014-12-20 02:43:55 +01:00
|
|
|
: Consists of:
|
2012-11-02 23:59:39 +01:00
|
|
|
|
|
|
|
* An optional [alpha subchunk](#alpha) for the frame.
|
|
|
|
|
|
|
|
* A [bitstream subchunk](#bitstream-vp8vp8l) for the frame.
|
|
|
|
|
2012-11-12 20:34:08 +01:00
|
|
|
* An optional list of [unknown chunks](#unknown-chunks).
|
|
|
|
|
2024-03-13 00:20:00 +01:00
|
|
|
**Note**: The 'ANMF' payload, _Frame Data_, consists of individual
|
2023-06-03 04:52:36 +02:00
|
|
|
_padded_ chunks, as described by the [RIFF file format](#riff-file-format).
|
2013-03-27 01:25:27 +01:00
|
|
|
|
2012-02-08 00:06:32 +01:00
|
|
|
#### Alpha
|
|
|
|
|
|
|
|
0 1 2 3
|
|
|
|
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
| ChunkHeader('ALPH') |
|
2022-08-02 03:44:26 +02:00
|
|
|
| |
|
2012-02-08 00:06:32 +01:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
2012-05-22 11:36:22 +02:00
|
|
|
|Rsv| P | F | C | Alpha Bitstream... |
|
2012-02-08 00:06:32 +01:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
|
2012-11-02 23:27:37 +01:00
|
|
|
Reserved (Rsv): 2 bits
|
2012-05-22 11:36:22 +02:00
|
|
|
|
2022-10-10 23:05:04 +02:00
|
|
|
: MUST be `0`. Readers MUST ignore this field.
|
2012-05-22 11:36:22 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
Preprocessing (P): 2 bits
|
2012-11-02 23:27:37 +01:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
: These _informative_ bits are used to signal the preprocessing that has
|
2015-02-06 23:50:49 +01:00
|
|
|
been performed during compression. The decoder can use this information to
|
2023-05-26 20:56:24 +02:00
|
|
|
for example, dither the values or smooth the gradients prior to display.
|
2012-11-02 23:27:37 +01:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
* `0`: No preprocessing.
|
2022-11-18 04:13:39 +01:00
|
|
|
* `1`: Level reduction.
|
2012-05-22 11:36:22 +02:00
|
|
|
|
2023-06-07 07:09:41 +02:00
|
|
|
Decoders are not required to use this information in any specified way.
|
|
|
|
|
2012-05-22 11:36:22 +02:00
|
|
|
Filtering method (F): 2 bits
|
2011-10-04 17:53:54 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
: The filtering methods used are described as follows:
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2015-02-06 23:50:49 +01:00
|
|
|
* `0`: None.
|
|
|
|
* `1`: Horizontal filter.
|
|
|
|
* `2`: Vertical filter.
|
|
|
|
* `3`: Gradient filter.
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-07-11 04:50:30 +02:00
|
|
|
For each pixel, filtering is performed using the following calculations.
|
|
|
|
Assume the alpha values surrounding the current `X` position are labeled as:
|
|
|
|
|
|
|
|
C | B |
|
|
|
|
---+---+
|
|
|
|
A | X |
|
|
|
|
|
|
|
|
We seek to compute the alpha value at position `X`. First, a prediction is
|
|
|
|
made depending on the filtering method:
|
|
|
|
|
|
|
|
* Method `0`: predictor = 0
|
|
|
|
* Method `1`: predictor = A
|
|
|
|
* Method `2`: predictor = B
|
|
|
|
* Method `3`: predictor = clip(A + B - C)
|
|
|
|
|
|
|
|
where `clip(v)` is equal to:
|
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
* 0 if v < 0,
|
|
|
|
* 255 if v > 255, or
|
2012-07-11 04:50:30 +02:00
|
|
|
* v otherwise
|
|
|
|
|
|
|
|
The final value is derived by adding the decompressed value `X` to the
|
2022-11-18 03:08:11 +01:00
|
|
|
predictor and using modulo-256 arithmetic to wrap the \[256..511\] range
|
|
|
|
into the \[0..255\] one:
|
2012-07-11 04:50:30 +02:00
|
|
|
|
|
|
|
`alpha = (predictor + X) % 256`
|
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
There are special cases for the left-most and top-most pixel positions. For
|
|
|
|
example, the top-left value at location (0, 0) uses 0 as the predictor value.
|
|
|
|
Otherwise:
|
2012-07-11 04:50:30 +02:00
|
|
|
|
|
|
|
* For horizontal or gradient filtering methods, the left-most pixels at
|
|
|
|
location (0, y) are predicted using the location (0, y-1) just above.
|
|
|
|
* For vertical or gradient filtering methods, the top-most pixels at
|
|
|
|
location (x, 0) are predicted using the location (x-1, 0) on the left.
|
|
|
|
|
2012-11-02 23:27:37 +01:00
|
|
|
Compression method (C): 2 bits
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-11-02 23:27:37 +01:00
|
|
|
: The compression method used:
|
|
|
|
|
2015-02-06 23:50:49 +01:00
|
|
|
* `0`: No compression.
|
|
|
|
* `1`: Compressed using the WebP lossless format.
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2012-05-22 11:36:22 +02:00
|
|
|
Alpha bitstream: _Chunk Size_ - `1` bytes
|
2011-11-22 10:10:41 +01:00
|
|
|
|
2012-02-08 00:06:32 +01:00
|
|
|
: Encoded alpha bitstream.
|
2011-11-22 10:10:41 +01:00
|
|
|
|
2015-02-06 23:50:49 +01:00
|
|
|
This optional chunk contains encoded alpha data for this frame. A frame
|
2023-06-03 04:55:46 +02:00
|
|
|
containing a 'VP8L' Chunk SHOULD NOT contain this chunk.
|
2012-07-18 21:16:51 +02:00
|
|
|
|
2012-11-02 23:59:39 +01:00
|
|
|
**Rationale**: The transparency information is already part of the 'VP8L'
|
2023-06-03 04:55:46 +02:00
|
|
|
Chunk.
|
2011-11-22 10:10:41 +01:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
The alpha channel data is stored as uncompressed raw data (when the
|
2012-05-22 11:36:22 +02:00
|
|
|
compression method is '0') or compressed using the lossless format
|
|
|
|
(when the compression method is '1').
|
2011-11-22 10:10:41 +01:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
* Raw data: This consists of a byte sequence of length = width * height,
|
2012-07-13 04:19:39 +02:00
|
|
|
containing all the 8-bit transparency values in scan order.
|
2012-05-24 16:20:11 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
* Lossless format compression: The byte sequence is a compressed
|
|
|
|
image-stream (as described in ["WebP Lossless Bitstream Format"]
|
|
|
|
[webpllspec]) of implicit dimensions width x height. That is, this
|
|
|
|
image-stream does NOT contain any headers describing the image dimensions.
|
2012-05-24 16:20:11 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
**Rationale**: The dimensions are already known from other sources,
|
|
|
|
so storing them again would be redundant and prone to error.
|
2012-05-24 16:20:11 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
Once the image-stream is decoded into Alpha, Red, Green, Blue (ARGB) color
|
|
|
|
values, following the process described in the lossless format
|
|
|
|
specification, the transparency information must be extracted from the
|
|
|
|
*green* channel of the ARGB quadruplet.
|
2012-05-24 16:20:11 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
**Rationale**: The green channel is allowed extra transformation
|
2012-07-13 04:19:39 +02:00
|
|
|
steps in the specification -- unlike the other channels -- that can
|
2012-05-24 16:20:11 +02:00
|
|
|
improve compression.
|
|
|
|
|
2012-06-22 01:03:20 +02:00
|
|
|
#### Bitstream (VP8/VP8L)
|
|
|
|
|
2014-12-20 02:43:55 +01:00
|
|
|
This chunk contains compressed bitstream data for a single frame.
|
2012-06-22 01:03:20 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
A bitstream chunk may be either (i) a 'VP8 ' Chunk, using 'VP8 ' (note the
|
|
|
|
significant fourth-character space) as its FourCC, _or_ (ii) a 'VP8L' Chunk,
|
|
|
|
using 'VP8L' as its FourCC.
|
2012-06-22 01:03:20 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
The formats of 'VP8 ' and 'VP8L' Chunks are as described in sections
|
2015-02-06 23:50:49 +01:00
|
|
|
[Simple File Format (Lossy)](#simple-file-format-lossy)
|
2023-06-03 04:52:36 +02:00
|
|
|
and [Simple File Format (Lossless)](#simple-file-format-lossless), respectively.
|
2012-06-22 01:03:20 +02:00
|
|
|
|
2022-11-21 19:33:37 +01:00
|
|
|
#### Color Profile
|
2012-10-30 23:58:54 +01:00
|
|
|
|
|
|
|
0 1 2 3
|
|
|
|
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
| ChunkHeader('ICCP') |
|
2022-08-02 03:44:26 +02:00
|
|
|
| |
|
2012-10-30 23:58:54 +01:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
2022-08-02 03:44:26 +02:00
|
|
|
: Color Profile :
|
2012-10-30 23:58:54 +01:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
|
|
|
|
Color Profile: _Chunk Size_ bytes
|
|
|
|
|
|
|
|
: ICC profile.
|
|
|
|
|
2012-11-02 23:59:39 +01:00
|
|
|
This chunk MUST appear before the image data.
|
2012-10-30 23:58:54 +01:00
|
|
|
|
|
|
|
There SHOULD be at most one such chunk. If there are more such chunks, readers
|
|
|
|
MAY ignore all except the first one.
|
|
|
|
See the [ICC Specification][iccspec] for details.
|
|
|
|
|
|
|
|
If this chunk is not present, sRGB SHOULD be assumed.
|
|
|
|
|
2013-03-14 02:16:30 +01:00
|
|
|
#### Metadata
|
2012-10-31 00:00:45 +01:00
|
|
|
|
2023-06-03 04:55:46 +02:00
|
|
|
Metadata can be stored in 'EXIF' or 'XMP ' Chunks.
|
2012-10-31 00:00:45 +01:00
|
|
|
|
|
|
|
There SHOULD be at most one chunk of each type ('EXIF' and 'XMP '). If there
|
2022-09-30 04:00:21 +02:00
|
|
|
are more such chunks, readers MAY ignore all except the first one.
|
2012-10-31 00:00:45 +01:00
|
|
|
|
|
|
|
The chunks are defined as follows:
|
|
|
|
|
2023-06-03 04:55:46 +02:00
|
|
|
'EXIF' Chunk:
|
2012-10-31 00:00:45 +01:00
|
|
|
|
|
|
|
0 1 2 3
|
|
|
|
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
| ChunkHeader('EXIF') |
|
2022-08-02 03:44:26 +02:00
|
|
|
| |
|
2012-10-31 00:00:45 +01:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
2022-08-02 03:44:26 +02:00
|
|
|
: Exif Metadata :
|
2012-10-31 00:00:45 +01:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
|
2022-01-26 03:36:36 +01:00
|
|
|
Exif Metadata: _Chunk Size_ bytes
|
2012-10-31 00:00:45 +01:00
|
|
|
|
2022-11-18 04:13:39 +01:00
|
|
|
: Image metadata in Exif format.
|
2012-10-31 00:00:45 +01:00
|
|
|
|
2023-06-03 04:55:46 +02:00
|
|
|
'XMP ' Chunk:
|
2012-10-31 00:00:45 +01:00
|
|
|
|
|
|
|
0 1 2 3
|
|
|
|
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
| ChunkHeader('XMP ') |
|
2022-08-02 03:44:26 +02:00
|
|
|
| |
|
2012-10-31 00:00:45 +01:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
2022-08-02 03:44:26 +02:00
|
|
|
: XMP Metadata :
|
2012-10-31 00:00:45 +01:00
|
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
|
|
|
|
|
|
XMP Metadata: _Chunk Size_ bytes
|
|
|
|
|
2022-11-18 04:13:39 +01:00
|
|
|
: Image metadata in XMP format.
|
2012-10-31 00:00:45 +01:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
Note that the fourth character in the 'XMP ' FourCC is an ASCII space (0x20).
|
2022-08-02 03:50:17 +02:00
|
|
|
|
2012-10-31 00:00:45 +01:00
|
|
|
Additional guidance about handling metadata can be found in the
|
2023-06-03 04:52:36 +02:00
|
|
|
Metadata Working Group's ["Guidelines for Handling Metadata"][metadata].
|
2012-10-31 00:00:45 +01:00
|
|
|
|
2021-10-22 21:15:24 +02:00
|
|
|
#### Unknown Chunks
|
2012-02-08 00:06:32 +01:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
A RIFF chunk (described in the [RIFF File Format](#riff-file-format) section)
|
|
|
|
whose FourCC is different from any of the chunks described in this document, is
|
2012-11-12 20:34:08 +01:00
|
|
|
considered an _unknown chunk_.
|
|
|
|
|
|
|
|
**Rationale**: Allowing unknown chunks gives a provision for future extension
|
2023-06-03 04:52:36 +02:00
|
|
|
of the format and also allows storage of any application-specific data.
|
2012-11-12 20:34:08 +01:00
|
|
|
|
|
|
|
A file MAY contain unknown chunks:
|
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
* at the end of the file, as described in [Extended WebP file
|
|
|
|
header](#extended_header) section, or
|
|
|
|
* at the end of 'ANMF' Chunks, as described in the
|
2014-12-20 02:43:55 +01:00
|
|
|
[Animation](#animation) section.
|
2012-11-12 20:34:08 +01:00
|
|
|
|
|
|
|
Readers SHOULD ignore these chunks. Writers SHOULD preserve them in their
|
2012-11-13 19:41:13 +01:00
|
|
|
original order (unless they specifically intend to modify these chunks).
|
2012-02-08 00:06:32 +01:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
### Canvas Assembly from Frames
|
2012-10-31 00:06:36 +01:00
|
|
|
|
2022-10-11 02:23:58 +02:00
|
|
|
Here we provide an overview of how a reader MUST assemble a canvas in the case
|
|
|
|
of an animated image.
|
2012-10-31 00:06:36 +01:00
|
|
|
|
2022-10-11 02:23:58 +02:00
|
|
|
The process begins with creating a canvas using the dimensions given in the
|
2023-06-03 04:52:36 +02:00
|
|
|
'VP8X' Chunk, `Canvas Width Minus One + 1` pixels wide by `Canvas Height Minus
|
|
|
|
One + 1` pixels high. The `Loop Count` field from the 'ANIM' Chunk controls how
|
2022-10-11 02:23:58 +02:00
|
|
|
many times the animation process is repeated. This is `Loop Count - 1` for
|
2023-06-03 04:52:36 +02:00
|
|
|
nonzero `Loop Count` values or infinite if the `Loop Count` is zero.
|
2022-10-11 02:23:58 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
At the beginning of each loop iteration, the canvas is filled using the
|
|
|
|
background color from the 'ANIM' Chunk or an application-defined color.
|
2022-10-11 02:23:58 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
'ANMF' Chunks contain individual frames given in display order. Before rendering
|
2022-10-11 02:23:58 +02:00
|
|
|
each frame, the previous frame's `Disposal method` is applied.
|
|
|
|
|
|
|
|
The rendering of the decoded frame begins at the Cartesian coordinates (`2 *
|
2023-06-03 04:52:36 +02:00
|
|
|
Frame X`, `2 * Frame Y`), using the top-left corner of the canvas as the origin.
|
2022-10-11 02:23:58 +02:00
|
|
|
`Frame Width Minus One + 1` pixels wide by `Frame Height Minus One + 1` pixels
|
|
|
|
high are rendered onto the canvas using the `Blending method`.
|
|
|
|
|
|
|
|
The canvas is displayed for `Frame Duration` milliseconds. This continues until
|
2023-06-03 04:52:36 +02:00
|
|
|
all frames given by 'ANMF' Chunks have been displayed. A new loop iteration is
|
|
|
|
then begun, or the canvas is left in its final state if all iterations have been
|
2022-10-11 02:23:58 +02:00
|
|
|
completed.
|
|
|
|
|
|
|
|
The following pseudocode illustrates the rendering process. The notation
|
2023-06-03 04:52:36 +02:00
|
|
|
_VP8X.field_ means the field in the 'VP8X' Chunk with the same description.
|
2012-11-02 23:59:39 +01:00
|
|
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2023-10-06 20:33:23 +02:00
|
|
|
VP8X.flags.hasAnimation MUST be TRUE
|
2012-11-02 23:59:39 +01:00
|
|
|
canvas ← new image of size VP8X.canvasWidth x VP8X.canvasHeight with
|
2015-02-05 03:07:00 +01:00
|
|
|
background color ANIM.background_color.
|
2012-11-02 23:59:39 +01:00
|
|
|
loop_count ← ANIM.loopCount
|
2022-10-11 02:23:58 +02:00
|
|
|
dispose_method ← Dispose to background color
|
2012-11-02 23:59:39 +01:00
|
|
|
if loop_count == 0:
|
2022-08-05 04:28:16 +02:00
|
|
|
loop_count = ∞
|
2012-11-02 23:59:39 +01:00
|
|
|
frame_params ← nil
|
2023-10-06 20:33:23 +02:00
|
|
|
next chunk in image_data is ANMF MUST be TRUE
|
2015-02-05 03:07:00 +01:00
|
|
|
for loop = 0..loop_count - 1
|
2023-06-03 04:52:36 +02:00
|
|
|
clear canvas to ANIM.background_color or application-defined color
|
2022-08-05 04:28:16 +02:00
|
|
|
until eof or non-ANMF chunk
|
|
|
|
frame_params.frameX = Frame X
|
|
|
|
frame_params.frameY = Frame Y
|
|
|
|
frame_params.frameWidth = Frame Width Minus One + 1
|
|
|
|
frame_params.frameHeight = Frame Height Minus One + 1
|
|
|
|
frame_params.frameDuration = Frame Duration
|
|
|
|
frame_right = frame_params.frameX + frame_params.frameWidth
|
|
|
|
frame_bottom = frame_params.frameY + frame_params.frameHeight
|
2023-10-06 20:33:23 +02:00
|
|
|
VP8X.canvasWidth >= frame_right MUST be TRUE
|
|
|
|
VP8X.canvasHeight >= frame_bottom MUST be TRUE
|
2022-08-05 04:28:16 +02:00
|
|
|
for subchunk in 'Frame Data':
|
|
|
|
if subchunk.tag == "ALPH":
|
2023-10-06 20:33:23 +02:00
|
|
|
alpha subchunks not found in 'Frame Data' earlier MUST be
|
|
|
|
TRUE
|
2022-08-05 04:28:16 +02:00
|
|
|
frame_params.alpha = alpha_data
|
|
|
|
else if subchunk.tag == "VP8 " OR subchunk.tag == "VP8L":
|
2023-10-06 20:33:23 +02:00
|
|
|
bitstream subchunks not found in 'Frame Data' earlier MUST
|
|
|
|
be TRUE
|
2022-08-05 04:28:16 +02:00
|
|
|
frame_params.bitstream = bitstream_data
|
|
|
|
render frame with frame_params.alpha and frame_params.bitstream
|
|
|
|
on canvas with top-left corner at (frame_params.frameX,
|
2023-06-03 04:52:36 +02:00
|
|
|
frame_params.frameY), using Blending method
|
2022-10-11 02:23:58 +02:00
|
|
|
frame_params.blendingMethod.
|
2022-08-05 04:28:16 +02:00
|
|
|
canvas contains the decoded image.
|
|
|
|
Show the contents of the canvas for
|
2023-06-03 04:52:36 +02:00
|
|
|
frame_params.frameDuration * 1 ms.
|
2022-10-11 02:23:58 +02:00
|
|
|
dispose_method = frame_params.disposeMethod
|
2012-11-02 23:59:39 +01:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2015-02-06 23:50:49 +01:00
|
|
|
|
|
|
|
Example File Layouts
|
2012-02-08 00:06:32 +01:00
|
|
|
--------------------
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
A lossy-encoded image with alpha may look as follows:
|
2012-02-08 00:06:32 +01:00
|
|
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
RIFF/WEBP
|
|
|
|
+- VP8X (descriptions of features used)
|
2012-07-13 21:16:16 +02:00
|
|
|
+- ALPH (alpha bitstream)
|
|
|
|
+- VP8 (bitstream)
|
2012-06-22 01:03:20 +02:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
A lossless-encoded image may look as follows:
|
2012-06-22 01:03:20 +02:00
|
|
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
RIFF/WEBP
|
|
|
|
+- VP8X (descriptions of features used)
|
|
|
|
+- VP8L (lossless bitstream)
|
2023-09-01 23:57:42 +02:00
|
|
|
+- XYZW (unknown chunk)
|
2012-02-08 00:06:32 +01:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2011-10-04 19:11:15 +02:00
|
|
|
|
2023-06-03 04:52:36 +02:00
|
|
|
A lossless image with an ICC profile and XMP metadata may
|
2012-10-31 00:00:45 +01:00
|
|
|
look as follows:
|
2012-10-30 23:58:54 +01:00
|
|
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
RIFF/WEBP
|
|
|
|
+- VP8X (descriptions of features used)
|
|
|
|
+- ICCP (color profile)
|
|
|
|
+- VP8L (lossless bitstream)
|
2012-10-31 00:00:45 +01:00
|
|
|
+- XMP (metadata)
|
2012-10-30 23:58:54 +01:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2022-01-26 03:36:36 +01:00
|
|
|
An animated image with Exif metadata may look as follows:
|
2012-11-02 23:59:39 +01:00
|
|
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
RIFF/WEBP
|
|
|
|
+- VP8X (descriptions of features used)
|
|
|
|
+- ANIM (global animation parameters)
|
|
|
|
+- ANMF (frame1 parameters + data)
|
|
|
|
+- ANMF (frame2 parameters + data)
|
|
|
|
+- ANMF (frame3 parameters + data)
|
|
|
|
+- ANMF (frame4 parameters + data)
|
|
|
|
+- EXIF (metadata)
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2021-05-20 21:57:49 +02:00
|
|
|
[webpllspec]: https://chromium.googlesource.com/webm/libwebp/+/HEAD/doc/webp-lossless-bitstream-spec.txt
|
2021-11-17 20:16:58 +01:00
|
|
|
[iccspec]: https://www.color.org/icc_specs2.xalter
|
|
|
|
[metadata]: https://web.archive.org/web/20180919181934/http://www.metadataworkinggroup.org/pdf/mwg_guidance.pdf
|
2023-06-03 04:52:36 +02:00
|
|
|
[rec601]: https://www.itu.int/rec/R-REC-BT.601
|
2021-11-17 20:03:35 +01:00
|
|
|
[rfc 1166]: https://datatracker.ietf.org/doc/html/rfc1166
|
|
|
|
[rfc 2119]: https://datatracker.ietf.org/doc/html/rfc2119
|
2023-06-03 04:52:36 +02:00
|
|
|
[rfc 6386]: https://datatracker.ietf.org/doc/html/rfc6386
|
2022-08-02 03:37:19 +02:00
|
|
|
[rfc 8174]: https://datatracker.ietf.org/doc/html/rfc8174
|