-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Hey, I have been playing around and trying to render the output of resizing the frame but unfortunately my implementation is returning null and I am not completely sure why.
I have this:
const resized = resize(frame, {
scale: {
width: 256,
height: 256
},
crop: {
y: 0,
x: 0,
width: frame.width,
height: frame.width
},
pixelFormat: 'rgb',
dataType: 'uint8'
});
const data = Skia.Data.fromBytes(resized);
const img = Skia.Image.MakeImage(
{
width: 256,
height: 256,
alphaType: AlphaType.Opaque,
colorType: ColorType.RGBA_8888,
},
data,
4 * resized.length
)
I can't figure out what should be the right 3rd parameter of MakeImage. And I guess that is why it is returning an error
This is the Skia Doc about that: https://shopify.github.io/react-native-skia/docs/images/#makeimage
Metadata
Metadata
Assignees
Labels
No labels