The Metadata in WEBP files » History » Revision 1

Revision 1/11 | Next »
Ben Touchette, 17 Aug 2016 13:37
Initial start of WebP metadata page.

The Metadata in WEBP (.webp) files (Under construction)

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.

This page brief is about the WebP type image file container.

What is WebP?

Webp is a structured image container format (similar to the RIFF video format) issued from Google based on technology it acquired from ON2 Technologies.

How it is structured?

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:

  • Every chunk should have ChunkId(four bytes), ChunkSize(four bytes). Do not include size of ChunkId and ChunkSize in ChunkSize.
  • ChunkData having odd number of bytes should be padded with one more dummy byte, and ChunkSize is always even.
  • ChunkData can be simple data like animation frames, or another Chunk having similar structure as parent Chunk.
  • Every chunk will have data which has to be decoded according to either predefined schema or variable size metadata chunks.

Updated by Ben Touchette over 5 years ago · 1 revisions