about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* .Kartik K. Agaram2021-07-162-1/+101
|
* forgot to `git add` a fileKartik K. Agaram2021-07-161-0/+1098
|
* .Kartik K. Agaram2021-07-162-3/+3
|
* .Kartik K. Agaram2021-07-166-1539/+1363
|
* .Kartik K. Agaram2021-07-162-1133/+23
|
* more powerful load-sectorsKartik K. Agaram2021-07-163-18/+46
|
* .Kartik K. Agaram2021-07-165-33/+33
|
* .Kartik K. Agaram2021-07-163-21/+0
|
* .Kartik K. Agaram2021-07-16241-9375/+18695
|
* .Kartik K. Agaram2021-07-1689-102/+293
|
* .Kartik K. Agaram2021-07-162-5/+5
|
* .Kartik K. Agaram2021-07-161-1/+1
|
* .Kartik K. Agaram2021-07-161-55/+0
|
* .Kartik K. Agaram2021-07-156-45929/+0
|
* .Kartik K. Agaram2021-07-141-0/+1217
|
* color dithering seems to be workingKartik K. Agaram2021-07-141-1/+8
|
* .Kartik K. Agaram2021-07-141-0/+1
|
* .Kartik K. Agaram2021-07-141-1/+1
|
* clarify a corner case in 2's complement integersKartik K. Agaram2021-07-141-0/+31
| | | | https://merveilles.town/@akkartik/106577885001702701
* dithering ppm files using all 256 colorsKartik K. Agaram2021-07-131-2/+205
| | | | | Not quite working yet, but yields an interesting 'sketching-like' effect.
* scaling the palette working on third attemptKartik K. Agaram2021-07-131-2/+16
| | | | | See commits b4e997adb8 and 2777479a94. This seems like a good sign that dithering is now extremely precise.
* get rid of our ugly rounding codeKartik K. Agaram2021-07-131-8/+1
| | | | | | | | | | | | | | | It turns out "truncating" the last 4 bits is actually more accurate, because it divides up the palette evenly. Before: 0-7 -> 0 8-0x17 -> 1 0x18-0x27 -> 2 ... 0xd8-0xe7 -> 0xe 0xe8-0xff -> 0xf The first interval is just 8 shades, and the final interval is 24 shades.
* clean up some unseemly specklesKartik K. Agaram2021-07-131-3/+2
| | | | | | | Turns out they were a bug after all, and scaling the palette was just making them more obvious. The bug: I was carefully clamping to 0xf0 to avoid rounding later, but I forgot to do so for values between 0xf0 and 0xff. As a result, some values could round up past 0xff and turn black.
* cleanupKartik K. Agaram2021-07-131-65/+5
|
* give up on .pgm files with color depths != 255Kartik K. Agaram2021-07-131-9/+5
| | | | | | Things kinda seem to work for color depths close to 255, but it isn't really the goal here, and I don't have the skills of numerical analysis to track this down.
* undoKartik K. Agaram2021-07-131-19/+7
|
* experimentKartik K. Agaram2021-07-131-7/+19
| | | | | Now scaling pixels to 255 levels looks a lot better. Still worse, though. On both t.pgm and barbara.pgm.
* now t.pgm looks rightKartik K. Agaram2021-07-131-7/+7
|
* clamp the upper bound of nearest-color as wellKartik K. Agaram2021-07-131-30/+53
| | | | | I'd kinda convinced myself it would never happen, but observations say otherwise. Unless there's a bug elsewhere..
* .Kartik K. Agaram2021-07-131-6/+11
|
* .Kartik K. Agaram2021-07-131-14/+10
|
* finally a clue: error is going over 255Kartik K. Agaram2021-07-131-9/+75
| | | | Exactly in the places to the right of the line.
* undoKartik K. Agaram2021-07-131-14/+2
|
* experiment: scaling pixels to 255 levelsKartik K. Agaram2021-07-131-2/+14
| | | | | This is strictly worse than before, both with barbara.pgm and more subtly with t.pgm.
* .Kartik K. Agaram2021-07-123-43/+1331
| | | | | | | | | Undo commit 70a03be0d0 and reinline the helper extracted there. I have a better sense now of the primitives to reuse between greyscale and color dithering. https://merveilles.town/@akkartik/106571585137582228
* more precise error-diffusionKartik K. Agaram2021-07-122-34/+22222
| | | | | | | | | The Barbara test image has been looking right since commit 430dd67cb2. However, t.pgm has not. This doesn't fix it, but does seem like an improvement. The remaining error seems to be unrelated to rounding. Adding 8 more bits of precision has no effect.
* .Kartik K. Agaram2021-07-121-28/+28
|
* .Kartik K. Agaram2021-07-111-2/+2
|
* .Kartik K. Agaram2021-07-111-5/+2
|
* forget HSL conversion for now, stick to RGBKartik K. Agaram2021-07-112-13/+50
| | | | | It looks like seeking the nearest neighbor in HSL space leads to more saturated colors.
* .Kartik K. Agaram2021-07-111-42/+42
| | | | Inline a helper.
* .Kartik K. Agaram2021-07-111-33/+39
| | | | Extract a helper.
* .Kartik K. Agaram2021-07-111-32/+30
| | | | Inline an unnecessary block.
* .Kartik K. Agaram2021-07-111-20/+20
|
* .Kartik K. Agaram2021-07-111-1/+11
|
* dither 256-level greyscale to 8-level greyscaleKartik K. Agaram2021-07-112-2/+212
|
* .Kartik K. Agaram2021-07-101-24/+24
|
* .Kartik K. Agaram2021-07-101-3/+3
|
* .Kartik K. Agaram2021-07-104-23/+3
|
* .Kartik K. Agaram2021-07-101-88/+47
|
class='oid'>ba16a2e4 ^
9b3d4455 ^



ba16a2e4 ^
9b3d4455 ^

9506fb8e ^
3de15ddd ^
9506fb8e ^
fae694a0 ^
871c502d ^
4fc56903 ^
ea87d005 ^
b810fe28 ^
3de15ddd ^
6bd1c592 ^


a4570538 ^
4ffef98c ^

b810fe28 ^
4ffef98c ^


b810fe28 ^
90f204e3 ^
b810fe28 ^


4ffef98c ^
b810fe28 ^
4ffef98c ^

















ea87d005 ^
3201b163 ^


ea87d005 ^
3201b163 ^

99e6cf47 ^
b810fe28 ^
46693c4b ^








fae694a0 ^
ec5dfcb1 ^

b4b0eb24 ^

b810fe28 ^

3566114b ^
863f85ce ^


92b730a0 ^
3566114b ^
863f85ce ^
92b730a0 ^
863f85ce ^

3566114b ^
92b730a0 ^
30b25795 ^
3566114b ^
863f85ce ^
92b730a0 ^
863f85ce ^

ca44b076 ^
3566114b ^
ca44b076 ^
3566114b ^

3566114b ^
92b730a0 ^
















863f85ce ^
















92b730a0 ^
863f85ce ^
92b730a0 ^
863f85ce ^

30b25795 ^
cfdbb9d6 ^



863f85ce ^
4fb1670e ^
863f85ce ^
4fb1670e ^


cfdbb9d6 ^
863f85ce ^

6c34428d ^
863f85ce ^


cfdbb9d6 ^
e74ac575 ^
298c72a2 ^
cfdbb9d6 ^
4fb1670e ^

fae694a0 ^
fae694a0 ^
ec5dfcb1 ^

b4b0eb24 ^

863f85ce ^

50d31c9d ^
c2a89082 ^
863f85ce ^
c2a89082 ^
ec5dfcb1 ^
c1a50251 ^
fae694a0 ^

fae694a0 ^
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284