The Metadata in WEBP files » History » Version 1
Ben Touchette, 17 Aug 2016 13:37
Initial start of WebP metadata page.
| 1 | 1 | Ben Touchette | h1. The Metadata in WEBP (.webp) files (Under construction) |
|---|---|---|---|
| 2 | |||
| 3 | Please note: Four bytes words in caps have special significance in this document, which are called Chunk headers, and appear exactly same in the original WebP file. |
||
| 4 | |||
| 5 | This page brief is about the WebP type image file container. |
||
| 6 | |||
| 7 | h2. What is WebP? |
||
| 8 | |||
| 9 | Webp is a structured image container format (similar to the RIFF video format) issued from Google based on technology it acquired from ON2 Technologies. |
||
| 10 | |||
| 11 | h2. How it is structured? |
||
| 12 | |||
| 13 | Everything in WepB is structured in Chunk, sub-chunk hierarchy. Every chunk contains ChunkID, ChunkSize, and ChunkData. First four bytes of a WebP file type must be ASCII values corresponding to letters *RIFF* followed at offset 8 (in bytes) by the ASCII values corresponding to letters *WEBP*. This is the ChunkId parent of every other sub-chunk. Similar to the rules dominating RIFF structure which describe how a typical RIFF and WebP file are: |
||
| 14 | |||
| 15 | * Every chunk should have ChunkId(four bytes), ChunkSize(four bytes). Do not include size of ChunkId and ChunkSize in ChunkSize. |
||
| 16 | * ChunkData having odd number of bytes should be padded with one more dummy byte, and ChunkSize is always even. |
||
| 17 | * ChunkData can be simple data like animation frames, or another Chunk having similar structure as parent Chunk. |
||
| 18 | * Every chunk will have data which has to be decoded according to either predefined schema or variable size metadata chunks. |