Skip to content

Commit e1dd18e

Browse files
committed
There isn't a skia.Image.fromarray() which takes 3 colors; it has always been 4
1 parent c1dcff1 commit e1dd18e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

glassmorphic_live_skia.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
"""
4545

4646
def pil_noise_to_skimage(size):
47-
arr = (np.random.rand(size, size, 3) * 255).astype(np.uint8)
48-
img = Image.fromarray(arr, 'RGB')
47+
arr = (np.random.rand(size, size, 4) * 255).astype(np.uint8)
48+
img = Image.fromarray(arr, 'RGBA')
4949
return skia.Image.fromarray(np.array(img))
5050

5151
class GlassmorphicWidget(QWidget):

0 commit comments

Comments
 (0)