skia-python
skia-python copied to clipboard
Improve "convert to PIL" example
The default color type of a skia.Image
is platform dependent. On some systems (e.g., GitHub CI, and most Linux systems) the default color type is BGR (for endianness purposes).
See https://github.com/google/skia/blob/6ffe89f9b4cc8c1dae9c4a916f16f9c463e3fa6d/include/core/SkColorType.h#L58-L62
Thus, in general, not only one has to convert the alphaType
to create a PIL image, but also the colorType
.