frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

C2PM(Color to Pixel Map)

2•Yukesh_J•1mo ago
C2PM (Color-to-Pixel Map) is a new image representation format developed by Yukesh J. It stores image data using an inverted index structure rather than traditional pixel-linear ordering.

In C2PM, each unique RGB color is stored once, followed by a list of all pixel positions where that color appears. Formally, the format maps:

Color → {Pixel Indices}

This structure enables several properties:

Design Characteristics

Lossless representation of exact RGB images

Direct access to all pixels of a given color without scanning the entire image

Deterministic binary layout (header + entries + index arrays)

Simple linear decoding algorithm suitable for tooling or analysis

Potential Applications

Pixel-art workflows

Palette-based editing systems

Color-region mask generation

Image segmentation and inverse indexing research

Developer tooling that benefits from color-centric access patterns

Current Scope

C2PM is not a replacement for existing compressed formats (PNG, JPEG) and is not optimized for general photography or real-time rendering. It is intended as an alternative representation model focused on color organization rather than storage minimization.

Specification & Implementation

A reference implementation (encoder + decoder in C) and a description of the binary layout are available here:

https://github.com/yukeshj2006/C2PM-Color-to-Pixel-Map-Image-Format

Feedback on structural design, potential optimizations, or use-cases is welcome.

Comments

HelloNurse•1mo ago
Why do you think the mentioned "color-centric" image processing operations deserve a specialized file format, rather than building and using a transient index in memory when it is useful? Do you have some special use case in mind?

Any interactive application, for instance, can be expected to render the image to the screen (repeatedly); any GPU use for texture mapping needs pixels sorted by location, regardless of whether pixel values are palette indices or explicit colours; many image processing tasks, like segmentation and drawing, need efficient access to pixels at arbitrary locations or near already processed locations.

Yukesh_J•1mo ago
Thanks for asking, C2PM isn’t meant to replace raster formats it serves as an intermediate format for workflows where users repeatedly operate on color groups (palette swaps, region recoloring, mask generation, etc). In a standard image, every color swap requires rescanning all pixels. In C2PM, the color to pixel index is already stored, so repeated swaps or multi-color operations become O(1) per color instead of O(P) per operation. It’s designed for tools where color groups matter more than spatial order, not for real-time display or GPU textures.

The Field Guide to Design Futures

https://designfutures.guide/
1•andyjohnson0•41s ago•0 comments

The Other Leverage in Software and AI

https://tomtunguz.com/the-other-leverage-in-software-and-ai/
1•gmays•2m ago•0 comments

AUR malware scanner written in Rust

https://github.com/Sohimaster/traur
2•sohimaster•4m ago•0 comments

Free FFmpeg API [video]

https://www.youtube.com/watch?v=6RAuSVa4MLI
2•harshalone•4m ago•1 comments

Are AI agents ready for the workplace? A new benchmark raises doubts

https://techcrunch.com/2026/01/22/are-ai-agents-ready-for-the-workplace-a-new-benchmark-raises-do...
2•PaulHoule•9m ago•0 comments

Show HN: AI Watermark and Stego Scanner

https://ulrischa.github.io/AIWatermarkDetector/
1•ulrischa•10m ago•0 comments

Clarity vs. complexity: the invisible work of subtraction

https://www.alexscamp.com/p/clarity-vs-complexity-the-invisible
1•dovhyi•11m ago•0 comments

Solid-State Freezer Needs No Refrigerants

https://spectrum.ieee.org/subzero-elastocaloric-cooling
1•Brajeshwar•11m ago•0 comments

Ask HN: Will LLMs/AI Decrease Human Intelligence and Make Expertise a Commodity?

1•mc-0•12m ago•1 comments

From Zero to Hero: A Brief Introduction to Spring Boot

https://jcob-sikorski.github.io/me/writing/from-zero-to-hello-world-spring-boot
1•jcob_sikorski•13m ago•0 comments

NSA detected phone call between foreign intelligence and person close to Trump

https://www.theguardian.com/us-news/2026/feb/07/nsa-foreign-intelligence-trump-whistleblower
6•c420•13m ago•0 comments

How to Fake a Robotics Result

https://itcanthink.substack.com/p/how-to-fake-a-robotics-result
1•ai_critic•14m ago•0 comments

It's time for the world to boycott the US

https://www.aljazeera.com/opinions/2026/2/5/its-time-for-the-world-to-boycott-the-us
3•HotGarbage•14m ago•0 comments

Show HN: Semantic Search for terminal commands in the Browser (No Back end)

https://jslambda.github.io/tldr-vsearch/
1•jslambda•14m ago•1 comments

The AI CEO Experiment

https://yukicapital.com/blog/the-ai-ceo-experiment/
2•romainsimon•16m ago•0 comments

Speed up responses with fast mode

https://code.claude.com/docs/en/fast-mode
3•surprisetalk•19m ago•0 comments

MS-DOS game copy protection and cracks

https://www.dosdays.co.uk/topics/game_cracks.php
3•TheCraiggers•20m ago•0 comments

Updates on GNU/Hurd progress [video]

https://fosdem.org/2026/schedule/event/7FZXHF-updates_on_gnuhurd_progress_rump_drivers_64bit_smp_...
2•birdculture•21m ago•0 comments

Epstein took a photo of his 2015 dinner with Zuckerberg and Musk

https://xcancel.com/search?f=tweets&q=davenewworld_2%2Fstatus%2F2020128223850316274
10•doener•21m ago•2 comments

MyFlames: View MySQL execution plans as interactive FlameGraphs and BarCharts

https://github.com/vgrippa/myflames
1•tanelpoder•23m ago•0 comments

Show HN: LLM of Babel

https://clairefro.github.io/llm-of-babel/
1•marjipan200•23m ago•0 comments

A modern iperf3 alternative with a live TUI, multi-client server, QUIC support

https://github.com/lance0/xfr
3•tanelpoder•24m ago•0 comments

Famfamfam Silk icons – also with CSS spritesheet

https://github.com/legacy-icons/famfamfam-silk
1•thunderbong•25m ago•0 comments

Apple is the only Big Tech company whose capex declined last quarter

https://sherwood.news/tech/apple-is-the-only-big-tech-company-whose-capex-declined-last-quarter/
2•elsewhen•28m ago•0 comments

Reverse-Engineering Raiders of the Lost Ark for the Atari 2600

https://github.com/joshuanwalker/Raiders2600
2•todsacerdoti•29m ago•0 comments

Show HN: Deterministic NDJSON audit logs – v1.2 update (structural gaps)

https://github.com/yupme-bot/kernel-ndjson-proofs
1•Slaine•33m ago•0 comments

The Greater Copenhagen Region could be your friend's next career move

https://www.greatercphregion.com/friend-recruiter-program
2•mooreds•33m ago•0 comments

Do Not Confirm – Fiction by OpenClaw

https://thedailymolt.substack.com/p/do-not-confirm
1•jamesjyu•34m ago•0 comments

The Analytical Profile of Peas

https://www.fossanalytics.com/en/news-articles/more-industries/the-analytical-profile-of-peas
1•mooreds•34m ago•0 comments

Hallucinations in GPT5 – Can models say "I don't know" (June 2025)

https://jobswithgpt.com/blog/llm-eval-hallucinations-t20-cricket/
1•sp1982•34m ago•0 comments