4 ms·
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
by _benj 4y ago
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 https://en.m.wikipedia.org/wiki/Netpbm
[1] https://git.sr.ht/~benjcal/bc_libs/tree/main/item/bc_buffer.h#L182 https://git.sr.ht/~benjcal/bc_libs/tree/main/item/bc_buffer....
- edflsafoiewq 4y agoNo alpha channel unfortunately.
- _benj 4y agoyeah :(
- deathanatos 4y agoNetpbm (the spec) supports alpha. It's in the PAM format: https://netpbm.sourceforge.net/doc/pam.html 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…
- geokon 4y agoDo browsers support it?
- _benj 4y agoNot 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.c https://git.sr.ht/~benjcal/bc_tools/tree/main/item/bc_viewer...