fixed
							parent
							
								
									89ce9d1c3e
								
							
						
					
					
						commit
						a961b87960
					
				|  | @ -21,14 +21,15 @@ def get_monitor_info(monitor): | |||
| 
 | ||||
| 
 | ||||
| def pixbuf_to_dict(pixbuf, filename = ''): | ||||
|   has_alpha = pixbuf.get_has_alpha() | ||||
| 
 | ||||
|   # 没有apha通道时, get_pixels() 得到像素矩阵会出现极个别像素出现alpha通道 | ||||
|   # 所以, 这里强制设置alpha通道为false, 补全像素矩阵的数据 | ||||
|   if not has_alpha: | ||||
|     pixbuf = pixbuf.add_alpha(False, 0, 0, 0) | ||||
| 
 | ||||
|   if pixbuf: | ||||
|     has_alpha = pixbuf.get_has_alpha() | ||||
| 
 | ||||
|     # 没有apha通道时, get_pixels() 得到像素矩阵会出现极个别像素出现alpha通道 | ||||
|     # 所以, 这里强制设置alpha通道为false, 补全像素矩阵的数据 | ||||
|     if not has_alpha: | ||||
|       pixbuf = pixbuf.add_alpha(False, 0, 0, 0) | ||||
|        | ||||
|     image = { | ||||
|       "width": pixbuf.get_width(), | ||||
|       "height": pixbuf.get_height(), | ||||
|  |  | |||
		Reference in New Issue