summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorUrvang Joshi <urvang@google.com>2012-10-30 15:58:54 -0700
committerUrvang Joshi <urvang@google.com>2012-11-01 11:16:29 -0700
commitaf6f0db29192c95c1d0acdf88d1f9d157f99211a (patch)
treeca33ed6312d55b5ef6a1fdb31e1e99e24301fc15 /doc
parenta61a824b3af29a17de71cc1742839d63059b2159 (diff)
downloadlibwebp-af6f0db29192c95c1d0acdf88d1f9d157f99211a.tar.gz
Color profile specification in container spec
Change-Id: I53f849c7d93e1cdc971dda1fffd8f359f40607d3
Diffstat (limited to 'doc')
-rw-r--r--doc/webp-container-spec.txt48
1 files changed, 44 insertions, 4 deletions
diff --git a/doc/webp-container-spec.txt b/doc/webp-container-spec.txt
index 5ee08e57..e15aebda 100644
--- a/doc/webp-container-spec.txt
+++ b/doc/webp-container-spec.txt
@@ -13,7 +13,7 @@ end of this file.
WebP Container Specification
============================
-_Working Draft, v0.5, 20120713_
+_Working Draft, v0.6, 20121031_
* TOC placeholder
@@ -40,6 +40,9 @@ for:
* **Transparency.** An image may have transparency, i.e., an alpha channel.
+ * **Color Profile.** An image may have an embedded ICC profile as described
+ by the [International Color Consortium][iccspec].
+
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC 2119][].
@@ -249,6 +252,8 @@ An extended format file consists of:
* A 'VP8X' chunk with information about features used in the file.
+ * An optional 'ICCP' chunk with color profile.
+
* An optional 'ALPH' chunk with transparency information.
* The image bitstream contained in either a 'VP8 ' or 'VP8L' chunk.
@@ -272,7 +277,7 @@ Extended WebP file header:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ChunkHeader('VP8X') |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Rsv |L| Rsv | Reserved |
+ | R |I|L| Rsv | Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Canvas Width Minus One | ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -288,7 +293,11 @@ Alpha (L): 1 bit
: Set if the file contains some (or all) images with transparency information
("alpha").
-Reserved (Rsv): 3 bits
+ICC profile (I): 1 bit
+
+: Set if the file contains an ICC profile.
+
+Reserved (R): 2 bits
: SHOULD be `0`.
@@ -435,6 +444,28 @@ The formats of VP8 and VP8L chunks are as described in sections
[Simple file format (lossy)](#simple-file-format-lossy)
and [Simple file format (lossless)](#simple-file-format-lossless) respectively.
+#### Color profile
+
+ 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') |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Color Profile |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+Color Profile: _Chunk Size_ bytes
+
+: ICC profile.
+
+This chunk MUST appear before data for all the frames.
+
+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.
+
#### Unknown Chunks
A file MAY contain other unknown chunks. Readers SHOULD ignore these chunks.
@@ -461,7 +492,16 @@ RIFF/WEBP
+- VP8L (lossless bitstream)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+A lossless image with ICC profile may look as follows:
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+RIFF/WEBP
++- VP8X (descriptions of features used)
++- ICCP (color profile)
++- VP8L (lossless bitstream)
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
[vp8spec]: http://tools.ietf.org/html/rfc6386
[webpllspec]: https://gerrit.chromium.org/gerrit/gitweb?p=webm/libwebp.git;a=blob;f=doc/webp-lossless-bitstream-spec.txt;hb=master
-[metadata]: http://www.metadataworkinggroup.org/pdf/mwg_guidance.pdf
+[iccspec]: http://www.color.org/icc_specs2.xalter
[rfc 2119]: http://tools.ietf.org/html/rfc2119