frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

C2PM(Color to Pixel Map)

2•Yukesh_J•1h 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•5m 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.

Nintendo Switch 2 RAM prices rise 41%, NAND flash up 8% – shares nosedive

https://www.tomshardware.com/video-games/nintendo/nintendo-switch-2-ram-prices-rise-41-percent-na...
1•speckx•35s ago•0 comments

SQLite JSON at Full Index Speed Using Generated Columns

https://www.dbpro.app/blog/sqlite-json-virtual-columns-indexing
1•upmostly•1m ago•0 comments

Breaking Paragraphs into Lines [pdf]

https://gwern.net/doc/design/typography/tex/1981-knuth.pdf
1•Smaug123•1m ago•1 comments

Big Media Merger Is No Merger at All

https://www.eff.org/deeplinks/2025/12/best-big-media-merger-no-merger-all
1•hn_acker•2m ago•0 comments

Thousands Tell the Patent Office: Don't Hide Bad Patents from Review

https://www.eff.org/deeplinks/2025/12/thousands-tell-patent-office-dont-hide-bad-patents-review
2•hn_acker•2m ago•0 comments

Fedora: Open-source repository for long-term digital preservation

https://fedorarepository.org/
1•cernocky•3m ago•0 comments

I can't draw, so I made a website (to vent UK politics)

https://royalphallicsociety.uk/
1•ykurtov•8m ago•1 comments

Why Isn't Online Age Verification Just Like Showing Your ID in Person?

https://www.eff.org/deeplinks/2025/12/why-isnt-online-age-verification-just-showing-your-id-person
2•hn_acker•9m ago•0 comments

Flipping the NIS2 Switch: What Germany Implementation Means for 2026 Compliance

https://www.mofo.com/resources/insights/251208-flipping-the-nis2-switch-what-germanys-implementation
1•rbanffy•9m ago•0 comments

How to Run Ministral 3 with an AMD GPU on Windows

https://www.50-nuances-octets.fr/en/posts/ministral-3-gpu-amd-windows/
2•Sykursen•11m ago•0 comments

Why Text in Vampire Survivors Used to Look Weird

https://jslegenddev.substack.com/p/vampire-survivors-text-weird
1•ibobev•11m ago•0 comments

Next-gen supersonic jet engine gets a less glamorous job

https://newatlas.com/energy/boom-supersonic-engine-data-center/
1•breve•13m ago•0 comments

Genetic study reveals hidden links between psychiatric conditions

https://www.nature.com/articles/d41586-025-04037-w
2•bookofjoe•15m ago•1 comments

Dyalog APL: Our (Not So) Secret Ingredient [video]

https://www.youtube.com/watch?v=hnz6wjshRNc
3•pillowshift•16m ago•1 comments

Why Nobody Reads Anymore (and What That Says About Us)

https://mackleen.substack.com/p/why-nobody-reads-anymore-and-what
1•speckx•17m ago•0 comments

It's end-of-year concert season. Why do kids struggle with performance anxiety?

https://medicalxpress.com/news/2025-12-year-concert-season-kids-struggle.html
2•PaulHoule•17m ago•0 comments

FDA Approves First Gene Therapy for WAS. First Gene Therapy from a Non-Profit

https://www.fda.gov/news-events/press-announcements/fda-approves-first-gene-therapy-treatment-wis...
1•amarcheschi•18m ago•0 comments

A Chinese whistleblower living in the US is being hunted by Beijing with US tech

https://apnews.com/article/whistleblower-china-surveillance-tech-silicon-valley-adbd0bcfbb0892bfc...
5•alsdkfjas•18m ago•0 comments

A Plan for 5-10%* Faster Free-Threaded JIT by Python 3.16

https://fidget-spinner.github.io/posts/faster-jit-plan.html
1•Qem•20m ago•0 comments

Optimizing Mannequin

https://real-mrbeam.github.io/2025/12/11/Optimizing-Mannequin.html
1•ibobev•24m ago•0 comments

Chinese foundry SMIC achieves 5nm production without EUV tools

https://www.techpowerup.com/344000/chinese-smic-achieves-5-nm-production-on-n-3-node-without-euv-...
8•jsheard•26m ago•0 comments

Show HN: Work Simulation for developer evaluation instead of DSA and take-homes

https://imported-lush-slug.clueso.site/share/130f9789-54b9-41e4-b305-e5ecfe5e27fa
2•rishitchat•27m ago•0 comments

TikTok algorithm favors mental health content, analysis finds

https://www.washingtonpost.com/technology/interactive/2025/tiktok-algorithm-mental-health/
1•reaperducer•30m ago•0 comments

Chatbot-powered toys rebuked for discussing sexual, dangerous topics with kids

https://arstechnica.com/gadgets/2025/12/chatbot-powered-toys-rebuked-for-discussing-sexual-danger...
2•smurda•31m ago•0 comments

A New History of Arabia, Written in Stone (2018)

https://www.newyorker.com/culture/culture-desk/a-new-history-of-arabia-written-in-stone
1•janandonly•33m ago•0 comments

Climate Nobel Prize

https://climatenobelprize.org/
2•Vinnl•33m ago•0 comments

Magic Eye Tetris

https://www.lutanho.net/play/magiceyetetris5.html
1•JelteF•34m ago•0 comments

Show HN: Epstein's emails reconstructed in a message-style UI (OCR and LLMs)

https://github.com/Toon-nooT/epsteins-phone-reconstructed
6•toon-noot•35m ago•0 comments

How to break free from smart TV ads and tracking

https://arstechnica.com/gadgets/2025/12/the-ars-technica-guide-to-dumb-tvs/
12•fleahunter•35m ago•2 comments

Air passengers exposed to high levels of ultrafine particle pollution

https://www.theguardian.com/environment/2025/dec/12/air-passengers-extremely-high-levels-ultrafin...
3•belter•35m ago•0 comments