gre / react-native-view-shot

Snapshot a React Native view and save it to an image
https://github.com/gre/react-native-view-shot-example
MIT License
2.64k stars 344 forks source link

Align with React Native Skia? #494

Open wcandillon opened 11 months ago

wcandillon commented 11 months ago

Our original implementation of view snapshots is based on this module. We fixed quite a big of bugs since on Android (to respect transforms/opacity/ and z-index): https://github.com/Shopify/react-native-skia/blob/main/package/android/src/main/java/com/shopify/reactnative/skia/ViewScreenshotService.java

We recently published a really nice example of how far we can take this feature: https://www.youtube.com/watch?v=vKYEFpO06Tk There were 3 reasons we originally shipped this part of Skia instead of using this module:

  1. We wanted to avoid the image encoding step (but I see that now there is a "raw" option).
  2. We have a way to return the bitmap data via JSI without doing a bridge roundtrip (a bit simpler than using the filesystem but we could discuss it).
  3. We had control for fast bug fixes.

But I'm wondering if we should maybe do some alignments. Maybe we could improve on all fronts. I see that this feature is heavily featured/documented on Expo side (@brentvatne @Kudo)

wcandillon commented 4 months ago

@gre @cortinico I see that this module is still active, we fixed tons of bugs in our implementation since this issue was file and we also test it end-to-end. I'm really wondering if there is some alignment/code sharing we could do there