keshavkaul / react-native-sketch-view

A React Native component for touch based drawing supporting iOS and Android.
MIT License
99 stars 47 forks source link

[iOS] Saves image with transparency mask #27

Open stefannew opened 6 years ago

stefannew commented 6 years ago

Saving images after removing the View container's background, or setting it to transparent would result in an all-black image after saving on iOS only.

This PR aims to resolve this by creating the image with a transparency mask.

I realize now that I've removed the scale option from the call to UIGraphicsBeginImageContext, so let me know if this poses problems.

This issue was also raised in Issue https://github.com/keshavkaul/react-native-sketch-view/issues/23

Before:

before

After: after