Open
Description
Describe the bug
Sir, I need to export a Pillow image with a background (255, 255, 255, 0), I use this code to initialize the Skia to try to set the background as (255, 255, 255, 0)
with self.surface as canvas:
color = skia.Color(255, 255, 255, 0)
canvas.clear(color)
After I draw a line on the surface and use this code to export a Pillow image
skia_image = self.surface.makeImageSnapshot()
alphaType=skia.AlphaType.kUnpremul_AlphaType)
res = skia_image.convert(colorType=skia.ColorType.kRGBA_8888_ColorType,
alphaType=skia.AlphaType.kUnpremul_AlphaType)
return Image.fromarray(
res
)
But the background is (0, 0, 0, 0) when get the pillow Image
Please help! it will be greatly appreciated.
Thanks.
Metadata
Metadata
Assignees
Labels
No labels