Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

Is there a way to access a clipped svg image to save back to the device in react-native using react-native-svg

$
0
0

I have a static image that i crop with a circle and now i want to save this modified image in my device's gallery, does anyone know how to do that? I am using TypeScript.

cropped image

import React from "react";import { SafeAreaView } from "react-native";import Svg, { Circle, ClipPath, Defs, Image } from "react-native-svg";export const App = () => {    return (<SafeAreaView><Svg><Image                    href={require('./apple.jpg')}                    clipPath="url(#clip)" /><Defs><ClipPath id="clip"><Circle cx="150" cy="150" r="150" /></ClipPath></Defs></Svg></SafeAreaView>    );}export default App;

Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>