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

window背景设成png格式会有部分区域显示不正常,但是换成jpeg格式则没问题 #75

Open
archeng320 opened this issue Sep 3, 2021 · 4 comments

Comments

@archeng320
Copy link

显示分辨率1920x720,使用FB
写个简单的demo,window 设置背景图片,设成png格式会有部分区域显示不正常
image
原图是这样的
image
但是我将这个png转换成jpeg格式后,显示没有问题

@sohide
Copy link
Collaborator

sohide commented Sep 4, 2021

png可能有半透颜色, window背景不需要做半透混合, 建议你用jpg

@archeng320
Copy link
Author

这个PNG文件是24位深度的。在win10下用awtk显示是正常的。在linux 开发板上则显示有问题(试过将这个文件转成bmp再转回png,问题照旧。而且每次运行,色块的颜色也会不一样)。换了一种同样尺寸的png背景图片,竟然没有问题。。。有点奇怪

@archeng320
Copy link
Author

这张png 转成JPG ,再转回png,竟然显示正常了。

@fatalfeel
Copy link

use libpng12-dev not libpng18-dev
try usign python import PIL.Image do convert

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

3 participants