ppm-format

Installation
SKILL.md

PPM Format Integration Skill (wlframe/C Style)

When to Apply

Use this skill when implementing, integrating, or reviewing PPM read/write C code in wlframe, especially in image/, buffer/, or related modules.

PPM Format Essentials

  • PPM (Portable Pixmap) is a simple, uncompressed ASCII (P3) or binary (P6) image format.
  • Header: magic number (P3 or P6), width, height, max color value, then pixel data.
  • Pixel data: RGB triplets, row-major order.

Integration & API Design

  • Parse header strictly; validate magic number, dimensions, max value.
  • Support both ASCII and binary variants.
  • Convert pixel data to wlframe's internal format as needed.
  • API prefix: wlf_ppm_. Use init/create and finish/destroy patterns.
  • Struct layout: hot fields first, group pointers/handles/flags, hide implementation details via impl pointer.
Installs
4
Repository
zzxyb/wlframe
GitHub Stars
42
First Seen
Apr 29, 2026