Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

Expo cannot read files from filesystem directory on ios

$
0
0

I am rendering images after cropping it into squares using ImageManipulator then saving it to file system the issue is i can't render images from filesystem on ios but on android it works fine this is a snap shot of my code

        const img = 'https://url.com/do720ahaw3zerqcychmu.jpg';        await Image.getSize(img, (width, height) => {            this.setState({ width, height })        })        let imageWidth = this.state.width / 3;        let imageHieght = this.state.height / 3;        let list = [];        let crop = {};        for (let iHeight = 0; iHeight < 3; iHeight++) {            for (let iWidth = 0; iWidth < 3; iWidth++) {                let pointX = iWidth * imageWidth;                let pointY = iHeight * imageHieght;                crop = {                    originY: pointY,                    originX: pointX,                    // originX: (-(this.crop.originX - 46.875) * 3) / this.crop.scale,                    width: imageWidth,                    height: imageHieght                };                const data = await ImageManipulator.manipulateAsync(img, [{ crop }], { format: ImageManipulator.SaveFormat.JPEG });                list.push({ img: data.uri });            }        }

Viewing all articles
Browse latest Browse all 16552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>