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