Repository navigation
Conversation
jtomson
reviewed
Sep 16, 2026
Comment on lines
+319
to
+324
| cmdArgs = append(cmdArgs, "--pal-str", po.Dither.MeasuredPalette) | ||
| // Hull is the nine inks themselves. The tool otherwise falls back to | ||
| // widening the hull with magenta and cyan, which the nine-ink panel does | ||
| // not need; passing the dither palette here leaves it no extras to add. | ||
| cmdArgs = append(cmdArgs, "--map-pal-str", po.Dither.MeasuredPalette) | ||
| cmdArgs = append(cmdArgs, "--out-pal-str", opts07OutPalette) |
There was a problem hiding this comment.
maybe better to fix this in test.py itself
Author
There was a problem hiding this comment.
Gotcha, maybe like this? https://github.com/pushd/pushd-dither/pull/52
And then with imgproxy changes 22382f2.
There was a problem hiding this comment.
cool ya - now imgproxy just passes a wider --pal-str. and can drop --map-pal-str, --out-pal-str, and opts07OutPalette?
Author
There was a problem hiding this comment.
Yes, exactly. imgproxy changes are minimal and it moves the work into pushd-dither
The 10" panel measures 9 colors, but opts06 slices exactly 24 palette tokens, so a wider palette was truncated there and the leftover tokens then failed to parse. opts07 carries all 9 as name:L:a:b, adding or (orange), br (brownish 2) and y2 (softer yellow 2) to the Spectra 6. All nine inks are dithered. pushd-dither puts the six base pigments in canonical slots, keeps the extras after them, and dithers the whole palette, so adopting opts07 changes what the 10" panel renders. The gamut hull is set explicitly to those nine inks with --map-pal-str. Left to itself the tool widens the hull with magenta and cyan, which its README advises against for a 9+ colour palette. --out-pal-str carries the panel's drive values, which is what the frame matches the rendered image against. The tool's built-in out palette holds six colors; nine ink indices overflow it and it falls back to rendering the measured inks, which the frame has nothing to match. opts07 is a fixed 9 colors and rejects a 6 color palette; six and 18 sample calibration files stay on opts06. Its length check requires all 39 args rather than repeating the off by one in opts06, which admits a short palette and then panics on the slice. The submodule moves to superpixel_dither for the N-colour --pal-str parser that opts07 depends on. The commit pinned before it accepts six colours only. Assisted by Claude Opus 5
jnross
force-pushed
the
joe/opts07-nine-color-palette
branch
from
September 17, 2026 01:00
22382f2 to
d94af8e
Compare
jnross
changed the base branch from
master
to
joe/bump-base-image-v4-bookworm
September 17, 2026 01:01
jnross
added this pull request to stack #66
September 17, 2026 01:01
jnross
force-pushed
the
joe/opts07-nine-color-palette
branch
from
September 17, 2026 01:55
d94af8e to
64fe49f
Compare
opts07 passed --map-pal-str and --out-pal-str to correct two of the dither tool's defaults for a nine ink palette: it appended magenta and cyan to the gamut hull whatever the palette's width, and rendered --image-out against a six colour palette that nine ink indices overflow. Both defaults now key off the palette's width inside the tool, so the option set carries neither flag, nor a copy of the panel's drive values. With those gone the opts07 branch was identical to opts06 and they now share one. opts07 stays a separate option set because it parses a 36 token palette where opts06 slices 24. Rendering is unchanged: the tool-side defaults produce a pixel identical image to the explicit flags. Assisted by Claude Opus 5
jnross
force-pushed
the
joe/opts07-nine-color-palette
branch
from
September 17, 2026 21:16
64fe49f to
84c9aec
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
First draft of the changes to support passing 9-color calibration data from the frame record through to imgproxy and the dithering algorithm. The new colors are identified in the imgproxy params as
or(orange),br(brown), andy2(yellow2):This change points the
pushd-dithersubmodule at the current HEAD of thesuperpixel_ditherbranch. The submodule pointer may need to be updated if that branch advances or is merged.This change (or some change supporting 9-color input) must be merged and deployed to imgproxy before we can deploy
pushd-webchanges to pass that calibration data through in feed URLs: https://github.com/pushd/pushd-web/pull/17661How I tested it
Build and run the container locally:
Visit this URL: http://localhost:8080/unsafe/rs:fill:1600:1200/dither:fs:opts07:0.65:bk:17.56:8.58:-11.14:or:36.74:30.54:35.13:y2:63.55:-13.56:40.24:y:60.87:-13.36:64.8:bl:32.23:1.85:-36.16:br:46.48:16.13:46.41:r:25.09:37.85:24.52:g:31:-20.35:8.0:w:63.11:-3.69:-1.47/plain/local:///elephants.png
See this dithered image. Looks good if I
adb pushit to a frame and use/system/bin/eink-update.shto refresh the display