You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**`view`** references to a React Native component.
75
+
-**`options`** may include:
76
+
-**`width`** / **`height`***(number)*: the width and height of the image to capture.
77
+
-**`format`***(string)*: either `png` or `jpg`/`jpeg` or `webm` (Android). Defaults to `png`.
78
+
-**`quality`***(number)*: the quality. 0.0 - 1.0 (default). (only available on lossy formats like jpeg)
79
+
80
+
## Notes
81
+
82
+
Snapshots are not guaranteed to be pixel perfect. It also depends on the platform. Here is some difference we have noticed and how to workaround.
83
+
84
+
- Support of special components like Video / GL views remains untested.
85
+
- It's preferable to **use a background color on the view you rasterize** to avoid transparent pixels and potential weirdness that some border appear around texts.
86
+
87
+
## Thanks
88
+
89
+
- To initial iOS work done by @jsierles in https://github.com/jsierles/react-native-view-snapshot
90
+
- To React Native implementation of takeSnapshot in iOS by @nicklockwood
0 commit comments