
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
react-native-simple-image-cropper
Advanced tools
/demo.gif
npm i react-native-simple-image-cropper --save
or
yarn add react-native-simple-image-cropper
import React from 'react';
import { View, Image, Button, StyleSheet } from 'react-native';
import ImageCropper from 'react-native-simple-image-cropper';
const IMAGE = 'https://picsum.photos/900/500';
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
},
});
class App extends React.Component {
state = {
cropperParams: {},
croppedImage: '',
};
setCropperParams = cropperParams => {
this.setState(prevState => ({
...prevState,
cropperParams,
}));
};
handlePress = async () => {
const { cropperParams } = this.state;
const cropSize = {
width: 200,
height: 200,
};
try {
const result = await ImageCropper.crop({
...cropperParams,
imageUri: IMAGE,
cropSize,
});
this.setState(prevState => ({
...prevState,
croppedImage: result,
}));
} catch (error) {
console.log(error);
}
};
render() {
const { croppedImage } = this.state;
return (
<View style={styles.container}>
<ImageCropper imageUri={IMAGE} setCropperParams={this.setCropperParams} />
<Button onPress={this.handleCropPress} title="Crop Image" color="blue" />
{croppedImage ? (
<Image style={{ width: 100, height: 100 }} source={{ uri: croppedImage }} />
) : null}
</View>
);
}
}
Based from react-native-image-zoom.
MIT
FAQs
Simple react-native component for image cropping.
The npm package react-native-simple-image-cropper receives a total of 53 weekly downloads. As such, react-native-simple-image-cropper popularity was classified as not popular.
We found that react-native-simple-image-cropper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.