Skip to content

WebP VP8X support — strip the extended container instead of rejecting it #6

Description

@firejune

Extended-container WebP (VP8X, e.g. with ALPH + VP8 chunks) is currently rejected knowingly, and the rejection rationale is sound as far as it goes: stripping only the extended-container header would leave the inner frame header intact and the image trivially restorable — a fragment that is not a key.

But the practical fallout is real: a consumer with a lossy-sourced VP8X asset (~430 KB) had to consider re-encoding to plain lossless VP8L just to get it into cutting range, at a measured shipping cost of roughly +0.85 to +1.3 MB (lossless re-encode of lossy source inflates 3–4x).

Proposal: instead of rejecting VP8X, cut all the format-defining headers together:

  • the VP8X chunk body (canvas size, feature flags)
  • the ALPH chunk header (when present)
  • the inner VP8 /VP8L frame header (dimensions/frame tag)

That preserves key purity — nothing left behind lets a decoder reconstruct the dimensions — and makes the re-encode workaround (and its shipping cost) unnecessary.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions