Intelligent pictures (format 4) and direction-aware picture order
Format 4 decoded from Editor output: control words of eight 4-bit ops (runs up to 13, 12-bit long runs, literal blocks) over 8 colour slots, plus a run-length 7-bit alpha section. The encoder reproduces all 28 Editor samples byte for byte and the Editor keeps our pictures as is. Pictures are stored rotated by the display direction, byte 0 of N.i is 0x0A + direction; this applies to format 0 too. add_picture now writes the right format and order for the project; the renderer decodes format 4 and blends alpha. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a93cb58b96
commit
193bcd5d97
8 files changed
+301
-56
No files matched your search
+9
-7
@@ -13,9 +13,9 @@ byte for byte, or a file written by nxhmi was opened in the Editor and showed th
|
||||
| Checksums (page, project header, file table) | **complete**, verified |
|
||||
| Components | **31 / 31 types** (20 Basic + 11 Intelligent-only) read/write/create |
|
||||
| Readable JSON (enum names, colours) | done for every value list the Editor documents |
|
||||
| Pictures | Basic series **complete**; Intelligent compressed format **missing** |
|
||||
| Pictures | **complete**: format 0 (Basic) and format 4 (Intelligent, with alpha), all display directions |
|
||||
| Fonts | black/white **complete** incl. generation from TrueType; anti-aliased **missing** |
|
||||
| Rendering pages like the Editor | **pixel-identical** for most components for every Basic component incl. picture skins, radios, gauges and QR codes |
|
||||
| Rendering pages like the Editor | **pixel-identical** for every Basic component incl. picture skins, radios, gauges and QR codes |
|
||||
| New projects from scratch | `project.new_project(model)` for 12 Basic/Intelligent models; the generated demo is byte-identical to the Editor's re-save |
|
||||
| Compiling `.tft` firmware | **research only** -- not possible yet |
|
||||
|
||||
@@ -60,9 +60,11 @@ byte for byte, or a file written by nxhmi was opened in the Editor and showed th
|
||||
`format`, `dir`, `en`, `mode`, `psta`, `dez`, variable type, QR logo -- taken from the Editor's
|
||||
own attribute notes. Colours as `#rrggbb`. Still round-trips byte for byte.
|
||||
|
||||
### Pictures (Basic series)
|
||||
- `N.i` (RGB565, panel-native rotated order) and `N.is` (original file) -- encoder output is
|
||||
byte-identical to the Editor's; adding pictures verified in the Editor.
|
||||
### Pictures
|
||||
- `N.i` format 0 (Basic, raw RGB565) and format 4 (Intelligent, run-length + 7-bit alpha), stored
|
||||
rotated for the display direction, and `N.is` (original file) -- encoder output is
|
||||
byte-identical to the Editor's (format 4: 28 samples, all four directions); the Editor keeps
|
||||
our format-4 pictures unchanged; adding pictures verified in the Editor.
|
||||
|
||||
### Fonts
|
||||
- `.zi` version 6, black/white: decode/encode byte-identical to the Editor (224-glyph font).
|
||||
@@ -86,10 +88,10 @@ byte for byte, or a file written by nxhmi was opened in the Editor and showed th
|
||||
### `.HMI` side
|
||||
| Item | Notes |
|
||||
|---|---|
|
||||
| Intelligent picture format 4 | block codec with 8-bit alpha; first findings in FORMAT.md |
|
||||
| Picture quality below 100 (Editor picture list "Q:") | not studied |
|
||||
| Anti-aliased fonts, multi-byte encodings (GB2312, Big5, ...) | only B/W single-byte fonts seen |
|
||||
| Other display series | Discovery / Enhanced / Edge not sampled; only Basic + Intelligent templates |
|
||||
| Display direction | byte 12 decoded and written (`new_project(portrait=...)`); picture/glyph order verified for one direction (90° Basic) only |
|
||||
| Display direction | byte 12 decoded and written (`new_project(portrait=...)`); picture order verified for all four (format 4); font glyph order for 90° only |
|
||||
| Some header fields | main.HMI bytes 8, 13, 36, 0x41; page header 21/23; entry bytes 25-27 |
|
||||
| Font name shown in the Editor's Fonts panel | cosmetic, generated fonts show an odd label |
|
||||
| Media resources | video / audio / Gmov files themselves (not just the components) |
|
||||
|
||||
Reference in new issue
Block a user