Expo.takeSnapshotAsync() inconsistent results in base64 image

I am trying to capture signature using Expo Pixi. But when i try to get snapshot using Expo.takeSnapshotAsync(), I get inconsistent result. Sometimes the snapshot (imageData) is cropped and sometimes shrunk.

    let imageData = '';
    const targetPixelCount = 400;
    const editorPixelCount = 400;
    const pixelRatio = PixelRatio.get();
    const pixels = targetPixelCount / pixelRatio;
    const editorPixels = editorPixelCount / pixelRatio;
    const onDrawChange = async () => {
      const options = {
        format: 'png',
        quality: .1,
        result: 'data-uri',
        height: pixels,
        width: pixels
      imageData = await Expo.takeSnapshotAsync(this.sketch, options);

ExpoPixi in Render:

   ref={ref => (this.sketch = ref)}
   style={{ height: editorPixels, width: editorPixels, backgroundColor: '#ffff' }} />


This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.