Open keung7251 opened 4 years ago
filename: filename, directory: RNFS.DocumentDirectoryPath , mode: 'AspectFit'
@keung7251 have you solved localSourceImage issue?
@yestay90 The typing of LocalSourceImage is wrong.
Instead of path
, use filename
@yestay90 not yet
how did I solve it for android. 1.first, taking a picture by RNCamera(react-native-camera) and log the path of picture(bocz I dont know the right path)
2.load the image as background image in SketchCanvas
finally, it works!😃
Using this worked for me, thanks @xyshirly
localSourceImage={
{
filename: `${RNFS.DocumentDirectoryPath}/images/${imgName}`,
mode: 'AspectFit'
}
}
However, for some reason the image appears to be rotated 90 degrees counter-clockwise. Has anybody else seen this?
*Edit: Have confirmed, the changes made in this PR did fix the issue described above.
@jahorwitz , I am having problem when taking picture of text and setting it as localSouceImage. It is getting blur? DO you have such bug?
Using this worked for me, thanks @xyshirly
localSourceImage={ { filename: `${RNFS.DocumentDirectoryPath}/images/${imgName}`, mode: 'AspectFit' } }
However, for some reason the image appears to be rotated 90 degrees counter-clockwise. Has anybody else seen this?
*Edit: Have confirmed, the changes made in this PR did fix the issue described above.
What happened with the rotation bug?
localSourceImage not working
let path = RNFS.DocumentDirectoryPath + images.filename; RNFS.writeFile(path, images.filename, 'utf8') .then((success) => { console.log('success', success);