Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

localSourceImage not working #149

Open
keung7251 opened this issue Feb 25, 2020 · 8 comments
Open

localSourceImage not working #149

keung7251 opened this issue Feb 25, 2020 · 8 comments

Comments

@keung7251
Copy link

localSourceImage not working

let path = RNFS.DocumentDirectoryPath + images.filename;
RNFS.writeFile(path, images.filename, 'utf8')
.then((success) => {
console.log('success', success);

       })
@keung7251
Copy link
Author

filename: filename, directory: RNFS.DocumentDirectoryPath , mode: 'AspectFit'

@yestay90
Copy link

yestay90 commented Mar 4, 2020

@keung7251 have you solved localSourceImage issue?

@creambyemute
Copy link

@yestay90 The typing of LocalSourceImage is wrong.

Instead of path, use filename

@keung7251
Copy link
Author

@yestay90 not yet

@xyshirly
Copy link

xyshirly commented Apr 3, 2020

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)
image
image

2.load the image as background image in SketchCanvas
image

finally, it works!😃

@jahorwitz
Copy link

jahorwitz commented Jun 18, 2020

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.

@yestay90
Copy link

@jahorwitz , I am having problem when taking picture of text and setting it as localSouceImage. It is getting blur? DO you have such bug?

@parsable-aberonja
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants