Has JB wrapped Skia in some inaccessible way? I'm ...
# compose-desktop
v
Has JB wrapped Skia in some inaccessible way? I'm trying to convert a Skia Bitmap (for a Canvas) to black and white; all my searching returns methods like `
Copy code
Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
But there is no createBitmap function available. Nor pretty much any of the Android Bitmap functions.
k
Not sure how you were planning to set the pixels, but one way that works is: 1) create a compose
ImageBitmap
, 2) call
asDesktopBitmap
on it that returns the Skija's
Bitmap
class, and then 3) call
Bitmap.installPixels
o
Skia APIs available via org.jetbrains..skija package, no Android APIs exist for Desktop.