from PIL import Image
import numpy as np
import struct
def rgb_to_rgb565(r, g, b):
# Convert 8-bit RGB to 16-bit RGB565
color =
05-12
2312
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-22
378
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-27
2134
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-29
653
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-31
501
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-11