react-native-view-shot
react-native-view-shot copied to clipboard
how to avoid black edges formed after capturing.
Issue
getting black edges on the sides after capturing a view and sharing it. Version: Platform: IOS & Android
Expected behavior:
Need a image without black edges on horizontal sides
Actual behavior:
Getting black edges on left and right
Steps to reproduce the behavior
- create a view with size of 312x492, capture it under JPG format and share in any social media or save it you will observe black edges at horizontal sides
the captureRef is giving an image of size 1080x1355 and when i share it in any app its coming with black edges
I also encountered this problem seems to have to manually cut by myself
This issue has been resolved. I captured the image and rendered it to fit the screen width using another image element (with width set to screen width). Then, I used the view shot to capture this newly rendered image, which now has the device's screen width that has no black edges