webp-format

Installation
SKILL.md

WebP Format & libwebp Integration Skill (wlframe/C Style)

When to Apply

Use this skill when implementing, integrating, or reviewing WebP read/write C code in wlframe, especially in image/, buffer/, or related modules, or when using libwebp for WebP parsing/generation.

WebP Format Essentials

  • WebP is a modern image format supporting lossy and lossless compression, alpha, animation.
  • File is RIFF-based, starts with 'RIFF' and 'WEBP' signatures.
  • Supports VP8 (lossy), VP8L (lossless), VP8X (extended), alpha, ICC profile, EXIF, XMP.

libwebp Integration & API Design

  • Use official libwebp (https://github.com/webmproject/libwebp).
  • Typical workflow:
    1. Use WebPDecode* or WebPEncode* APIs for decoding/encoding.
    2. Set up input/output (file or memory).
    3. Convert pixel data to/from wlframe's internal format as needed.
    4. Release all allocated resources.
  • API prefix: wlf_webp_. Use init/create and finish/destroy patterns.
  • Struct layout: hot fields first, group pointers/handles/flags, hide implementation details via impl pointer.
Installs
2
Repository
zzxyb/wlframe
GitHub Stars
42
First Seen
Apr 29, 2026