We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我直接将工程ESP32-S3-EYE中AppLCD接口中的logo_en_240x240_lcd数组中的数据替换,显示的颜色异常,形状是对的。 我是将图片通过RGB888转成RGB565格式的16位无符号整形数组,显示的图片如下。
The text was updated successfully, but these errors were encountered:
转换前的图片
Sorry, something went wrong.
RGB888转RGB565的程序如下: from PIL import Image
def image_to_rgb565_array(image_path): img = Image.open(image_path) img = img.convert('RGB') # Convert image to RGB mode
width, height = img.size rgb565_array = [] for y in range(height): for x in range(width): r, g, b = img.getpixel((x, y)) # Convert RGB to RGB565 rgb565_value = ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3) rgb565_array.append(rgb565_value) return rgb565_array
image_path = 'your_image_path.jpg' rgb565_array = image_to_rgb565_array(image_path)
print(rgb565_array)
图像正确、颜色不对的问题,可能是 R\G\B 三分量的顺序与 LCD 要求的 R\G\B 分量的顺序不同导致的。请检查 LCD、图像数据的 R\G\B 分量的顺序、大小端是否一致。
No branches or pull requests
我直接将工程ESP32-S3-EYE中AppLCD接口中的logo_en_240x240_lcd数组中的数据替换,显示的颜色异常,形状是对的。
我是将图片通过RGB888转成RGB565格式的16位无符号整形数组,显示的图片如下。
The text was updated successfully, but these errors were encountered: