Restore the lost v1.8.0 fix for swapped middle grays in EP75 4-gray mode - #564
Open
kk1987 wants to merge 1 commit into
Open
Restore the lost v1.8.0 fix for swapped middle grays in EP75 4-gray mode#564kk1987 wants to merge 1 commit into
kk1987 wants to merge 1 commit into
Conversation
Commit 2ed5c80 ("Fixed temp profile toggling and improves 4-gray mode on all 7.5 inch panels") added the gray translate table to png_draw(), but it is reachable only from tag v1.8.0 and never made it to main, so 2-bpp rendering on EP75 panels swaps the two middle gray levels: PNG level 1 (dark gray) renders lighter than level 2 (light gray). This takes just that rendering hunk, byte-for-byte. Verified on a Seeed reTerminal E1001 with a 4-band calibration chart (with the bb_epaper pin from the companion PR; the current 2.1.9 pin cannot draw on that board at all). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RnbEJHrfQMVgshYATiSfMq
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.
After v1.8.0, 2-bpp rendering on EP75 panels swaps the two middle gray levels. PNG level 1, the dark gray, renders lighter than level 2, the light gray. Black and white are correct, so it's easy to miss without a calibration chart.
The fix already exists. Commit 2ed5c80 added a translate table to the split-plane path of
png_draw(), but that commit is reachable only from tag v1.8.0 and never made it into main. This PR takes just that rendering hunk, byte for byte. The rest of 2ed5c80, the temp profile plumbing, is also absent from main, but that's a separate question.I verified this on an E1001, on a v1.8.12 base together with the bb_epaper pin from #563. Without the hunk the two middle bands of a 4-band chart render inverted, and with it all four bands come out in order. v1.8.0 was always correct on the same panel. It pairs with that PR, since today's 2.1.9 pin can't draw on the E1001 at all and its EP75 gray tables predate the 3d3df73 rewrite. Pin plus hunk is the combination that has actually been tested.
Two things are deliberately left out. Profile "b" (
EP75_800x480_4GRAY_V2) keeps Larry's original two-panel check, because its LUT appears to encode the two mid-gray waveforms in swapped order already and translating there could swap them back. Andjpeg_draw()has the same un-translated plane split, but that path is currently unreachable since the JPEG path hard-codes 1-bit dithered, so I left it alone.🤖 Generated with Claude Code
https://claude.ai/code/session_01RnbEJHrfQMVgshYATiSfMq