about summary refs log tree commit diff
path: root/served/things/colorsquash/colorsquash.html
blob: e8a61c677207e647d20bf11ed04024e422eeb227 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
---
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
-->