Skip to content
New issue

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

Display photo yellowing #13

Open
a8555 opened this issue May 12, 2024 · 1 comment
Open

Display photo yellowing #13

a8555 opened this issue May 12, 2024 · 1 comment

Comments

@a8555
Copy link

a8555 commented May 12, 2024

I converted 240 * 240png and bits to 2 using image_converter. py in the st7789py driver. After displaying the tft. pbitmap (Picture1,0,0) in thorny, what happened to the yellowing of the photo? Other displayed colors are normal
What's the matter?

@a8555
Copy link
Author

a8555 commented May 31, 2024

抱歉,我在提出问题的一周后便解决了问题,但因为考试学业问题耽误了
问题出在st7789py_mpy-master\utils\image_converter.py这个文件中rgb_to_color565这个函数,在RGB888转换成RGB565的时候出了问题
原代码“return ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3)”应该改为“return ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b & 0xF8) >> 3”

ee6ca4d975e5d5d0932b74d00cc39e18

Sorry, I solved the problem a week after raising it, but it was delayed due to academic issues during the exam
The problem lies in the file st7789py_mpy master \ utils \ image_converter. py, where the function rgd_to_color565 encountered an issue when converting RGB888 to RGB565
The original code "return (r&0xF8)<<8) | (g&0xFC)<<3) | (b>>3)" should be changed to "return (r&0xF8)<<8) | (g&0xFC)<<3) | (b&0xF8)>>3"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant