--- template=post title=Colorsquash style=/styles/post.css style=memoryleak.css description=Colour quantizer art=astro_squash.gif art_alt=squashed dog --- [@paragraphs off] <style> table { border: none; border-collapse: collapse; border-spacing: 8px; } table tr:nth-last-of-type(2n) { background-color: var(--background-alt); } table td:first-of-type { padding-right: 8px; } table a { padding: 16px; } table caption { caption-side: bottom; color: var(--text-dim); } #images { display: flex; flex-direction: row; gap: 0.5rem; } #images figure { width: 50%; margin: 0rem; } figure img { width: 100%; } figcaption { text-align: center; } </style> <section id="images"> <figure> <img src="astro.jpg" alt="a small dog laying on a concrete floor in an industrial building"> <figcaption>24bit rgb</figcaption> </figure> <figure> <img src="astro_squash.gif" alt="the same image in 256 color. there are some visual differences, but the two images look very similar"> <figcaption>256 color indexed</figcaption> </figure> </section> <table style="max-width: 75%; margin: auto; float: right;"> <tr> <th>Platform</th> <th>Size</th> </tr> <tr> <td><a href="./v0.3.0/squash-v0.3.0_windows-x64.zip">Windows x64</a></td> <td>463K</td> </tr> <tr> <td><a href="./v0.3.0/squash-v0.3.0_linux-x64.tar.gz">Linux x64</a></td> <td>460K</td> </tr> <tr> <td><a href="./v0.3.0/squash-v0.3.0_linux-aarch64.tar.gz">Linux aarch64</a></td> <td>463K</td> </tr> <tr> <td><a href="./v0.3.0/squash-v0.3.0_macos-x64.tar.gz">MacOS x64</a></td> <td>424K</td> </tr> <tr> <td><a href="./v0.3.0/squash-v0.3.0_macos-aarch64.tar.gz">MacOS ARM</td> <td>413K</td> </tr> <caption> squash v0.3.0 </caption> </table> [@paragraphs on] colorsquash is a tool for squishing your image into only 256 distinct colours, allowing it to fit in a GIF or indexed PNG. It tries to do this with as little change as possible. <!-- Links: 1. https://stackoverflow.com/a/63868920 - https://github.com/herzbube/birthtime_touch - https://www.anmolsarma.in/post/linux-file-creation-time/ 2. https://man7.org/linux/man-pages/man2/statx.2.html -->