This repository has been archived on 2023-09-06. You can view files and clone it, but cannot push or open issues/pull-requests.
yutent
/
py-gtk-notes
Archived
1
0
Fork 0
master
yutent 2023-07-28 17:54:59 +08:00
parent 89ce9d1c3e
commit a961b87960
1 changed files with 7 additions and 6 deletions

View File

@ -21,6 +21,8 @@ def get_monitor_info(monitor):
def pixbuf_to_dict(pixbuf, filename = ''):
if pixbuf:
has_alpha = pixbuf.get_has_alpha()
# 没有apha通道时, get_pixels() 得到像素矩阵会出现极个别像素出现alpha通道
@ -28,7 +30,6 @@ def pixbuf_to_dict(pixbuf, filename = ''):
if not has_alpha:
pixbuf = pixbuf.add_alpha(False, 0, 0, 0)
if pixbuf:
image = {
"width": pixbuf.get_width(),
"height": pixbuf.get_height(),