about summary refs log tree commit diff stats
path: root/test/js/encode_decode.html
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-10-03 23:40:50 +0200
committerbptato <nincsnevem662@gmail.com>2024-10-04 00:04:05 +0200
commitfaa97429d651c76d86ad0c2ab530d9f666fb6927 (patch)
tree20db8af70f56bf385d43dd9da47a9c17d5d62677 /test/js/encode_decode.html
parent5817302b293eb1237c457a2fe7c774194f07c7d7 (diff)
downloadchawan-faa97429d651c76d86ad0c2ab530d9f666fb6927.tar.gz
sixel: fix some weird artifacts
Since getColor's color assignment eagerly fills in holes with the
nearest neighbor of the first such observed node, it is prone to falling
into a local minimum where dithering ends up switching between a few
very wrong colors.

Ensure this doesn't happen by always allocating at least 4 nodes of the
octree branch. (Allocating all 7 seems to result in a heavy performance
hit; just 4 means at worst 4096 extra nodes, but likely a lot less, and
I don't see a difference in either output or performance.)
Diffstat (limited to 'test/js/encode_decode.html')
0 files changed, 0 insertions, 0 deletions
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