Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Just in case others find it useful, I recently came across Netpbm[0] which is comically simple to implement![1]

It’s a pretty good image format if one wants to quickly make something visual with code.

[0] https://en.m.wikipedia.org/wiki/Netpbm

[1] https://git.sr.ht/~benjcal/bc_libs/tree/main/item/bc_buffer....



No alpha channel unfortunately.


yeah :(


Netpbm (the spec) supports alpha. It's in the PAM format: https://netpbm.sourceforge.net/doc/pam.html

I've never tried that variant, nor do I think I've seen files in the wild, so IDK how widely stuff supports it. If I have need for an alpha channel, I usually reach for a PNG encoder at that point…


Do browsers support it?


Not sure, tested it with firefox and it offered to download it. I don't think is a good format for the web though because it takes too much space.

I use it to make images with C locally and monitor them with a quick image viewer[0] I wrote

[0] https://git.sr.ht/~benjcal/bc_tools/tree/main/item/bc_viewer...




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: