fix: send SetPixelFormat to request 8bpp RGB332
All checks were successful
CI / fmt (push) Successful in 35s
CI / clippy (push) Successful in 57s
CI / check (push) Successful in 1m0s

The OmniView defaults to 16bpp when no SetPixelFormat is sent.
The Java applet sends SetPixelFormat (msg type 0) at
ByteColorRFBRenderer.new() line 76 to request 8bpp RGB332
(bpp=8, depth=8, true_color, red_max=7, green_max=7, blue_max=3,
shifts 0/3/6). Without this, pixel data arrives as 16bpp pairs
that produce green stripe artifacts when interpreted as 8bpp.

Verified: snapshot now matches the reference screenshot from
http://10.3.0.130/screenshot.jpg (dark screen with "Free" label).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-06 14:31:37 +03:00
parent e9823aff03
commit 1164ffdd98
2 changed files with 29 additions and 0 deletions

View File

@@ -58,6 +58,9 @@ impl ActiveSession {
server_init: raw.server_init,
};
// Tell server to send 8bpp RGB332 pixels
msg::write_set_pixel_format_rgb332(&mut session.writer)?;
// Send SetEncodings
msg::write_set_encodings(&mut session.writer, encodings)?;