cxt / webp

Automatically exported from code.google.com/p/webp
0 stars 0 forks source link

"ALPH" chunk and "VP8 " chunk may have a zero byte between them (invalid RIFF file) #260

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Sometimes when writing a webp file, the ALPH chunk will have a stray zero byte 
at the end, which is not part of the chunk's length.  If you are parsing a RIFF 
file manually, this is a problem, since the next chunk becomes "\0VP8" instead 
of "VP8 ".
Libwebp itself still decodes these files fine.

Original issue reported on code.google.com by danwe...@gmail.com on 8 Sep 2015 at 5:03

GoogleCodeExporter commented 9 years ago
This is part of the spec.

See: 
https://developers.google.com/speed/webp/docs/riff_container?hl=en#riff_file_for
mat

"Chunk Payload: Chunk Size bytes
The data payload. If Chunk Size is odd, a single padding byte -- that SHOULD be 
0 -- is added."

Original comment by urv...@google.com on 8 Sep 2015 at 5:13

GoogleCodeExporter commented 9 years ago
Never mind, odd sized chunks apparently need padding bytes.

Original comment by danwe...@gmail.com on 8 Sep 2015 at 5:16