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_. Useinit/createandfinish/destroypatterns. - Struct layout: hot fields first, group pointers/handles/flags, hide implementation details via
implpointer.