Skip to content

Not able to render image on ios 15.2.1 #293

Open
@kalyanipullela

Description

@kalyanipullela

Hello,

The image is loaded perfectly on ios simulators but on the real device the image is not displaying instead displaying a white blank screen.
I've used react-native-canvas version 0.1.38 and ios version is 15.2.1
Following is the code snippet I've tried

const handleCanvas = () =>{ 
const image = new CanvasImage(canvas);
          console.log("image",image)
          canvas.width = Dimensions. get('window'). width;
          canvas.height = Dimensions. get('window'). height;
         const ctx = canvas.getContext('2d');
//Not entering into this function on real devices but working on simulators
          image.addEventListener('load', () => {
              ctx.drawImage(image, 0, 0, 651, 442);
            }); 
}

<Canvas ref={handleCanvas}/>

Any help is appreciated

Thank you in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions