3 ms·
Please try it and find out!
by edent 3y ago
Please try it and find out!
- CharlesW 3y agoI̶ ̶a̶b̶s̶o̶l̶u̶t̶e̶l̶y̶ ̶w̶i̶l̶l̶ ̶i̶f̶ ̶I̶ ̶c̶a̶n̶ ̶f̶i̶n̶d̶ ̶t̶h̶e̶ ̶t̶i̶m̶e̶.̶ ̶M̶a̶y̶b̶e̶ ̶I̶ ̶c̶a̶n̶ ̶c̶o̶m̶b̶i̶n̶e̶ ̶t̶h̶i̶s̶ ̶w̶i̶t̶h̶ ̶m̶y̶ ̶"̶t̶r̶y̶ ̶B̶u̶n̶"̶ ̶t̶o̶ ̶d̶o̶ ̶l̶i̶s̶t̶ ̶i̶t̶e̶m̶…̶ I ended up having time to do a quick test with 4 characters per pixel (i.e. RGBA but no bit-packing) before taking my kids to their first D&D experience: • Romeo and Juliet source text: 146,706 bytes/136,684 chars • ZIP of source text: 58,696 bytes • PNG as created by Bun/pngjs: 128,754 bytes, 181px square – https://imgur.com/a/8IRR4Az • Further smooshed by ImageOptim: 84,789 bytes So, no joy. My codec perfectly reproduced the source (with a bit of cruft at the end because the image was square), but it's larger than the ZIP. I don't think adding bit-packing would help much. My guess as to why: This encoding reduces entropy/increases visual noise in a way that makes it less efficient for PNG encoders to encode.
- zepolen 3y agoYou have time to make valueless comments almost every day on HN, and also, by your own admission, have time to watch a ton of tv shows, sounds to me like you have plenty of time.
- deleted 3y ago[deleted]