color → list of pixel indices where that color appears
So it’s essentially an inverted index applied to image data. Not meant to compete with PNG/JPEG— but to make the retrieval of color based selection faster.
This format and reference implementation were developed by Yukesh J as part of an ongoing study into alternative image representations.
Why bother?
O(1) lookup for all pixels of a given color
Interesting for pixel-art tools, palette manipulation, region masks
Useful for certain computer-vision tasks where “color = class”
Introspectable structure (easy to analyze color distribution)
What it’s not:
Not compressed
Not optimized for general photography
Not practical for streaming/real-time use
v1 is purely structural and lossless
Implementation:
Written in C. Binary format: header + (RGB, count, indices). Includes encoder + decoder (PNG ↔ C2PM). MIT License. Repo:
https://github.com/yukeshj2006/C2PM-Color-to-Pixel-Map-Image-Format-v1