
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
expo-crop-image
Advanced tools
Allows user to crop image with given aspect ratio for react native using expo on Android and IOS - (Workaround for IOS always square images).
Allows user to crop image with given aspect ratio for react native using expo on Android and IOS.
npm install expo-crop-image
isRequired if there is a * in the name field
name | Proptypes | Description |
---|---|---|
imageUri * | string | Image address that will be used for cropping |
fixedAspectRatio * | number | Expect => aspect ratio. |
minimumCropDimensions | (size) | Expect => {width: number, height: number} [Default 100 X 100]. |
onEditingCancel * | func | void |
onEditingComplete * | func | Returns image object (image object fields => uri, width, height). |
editorOptions | object | Customize appearance of editor |
processingComponent | ReactNode | Customize appearance of loading between process |
import { ImageEditor } from "expo-crop-image";
<ImageEditor
imageUri={uri}
fixedAspectRatio={2 / 3}
minimumCropDimensions={{
width: 50,
height: 50,
}}
onEditingCancel={() => {
console.log("onEditingCancel");
}}
onEditingComplete={(image) => {
console.log(image);
}}
/>;
import { ImageEditor } from "expo-crop-image";
<ImageEditor
...
editorOptions={{
...
}}
/>;
type EditorOptions = {
backgroundColor?: string
controlBar?: {
position?: 'top' | 'bottom'
backgroundColor?: string
height?: number
cancelButton?: IconProps
cropButton?: IconProps
backButton?: IconProps
saveButton?: IconProps
}
coverMarker?: {
show?: boolean
color?: string
}
gridOverlayColor?: string
overlayCropColor?: string
}
type IconProps = {
color: string
text: string
iconName: FeatherIconNames | MaterialIconNames
}
This project was developed using the following technologies:
To use this package you have to install the following dependencies
Clone the project and access the folder.
git clone https://github.com/NitoBa/expo-crop-image.git
cd expo-crop-image && npm install
cd example-app && npm install && cd ..
Compile the package locally
# build the package locally
npm run build:dev
# watch to changes while running with app
npm run build:watch
Made with 💜 by Bruno Alves 👋
FAQs
Allows user to crop image with given aspect ratio for react native using expo on Android and IOS - (Workaround for IOS always square images).
The npm package expo-crop-image receives a total of 262 weekly downloads. As such, expo-crop-image popularity was classified as not popular.
We found that expo-crop-image 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.