fix: 跑通摄像头640x480配置

This commit is contained in:
alivender
2025-07-12 18:24:25 +08:00
parent f253a33c83
commit e25f08739a
4 changed files with 120 additions and 98 deletions

View File

@@ -72,7 +72,7 @@ public class Image
var b8 = (byte)((b5 * 255) / 31); // 5位扩展到8位
// 存储到 RGB24 数组
var rgb24Index = i * 3;
var rgb24Index = (i%2 == 0)?((i+1) * 3):((i-1) * 3);
rgb24Data[rgb24Index] = r8; // R
rgb24Data[rgb24Index + 1] = g8; // G
rgb24Data[rgb24Index + 2] = b8; // B