
Product
Introducing Socket Scanning for OpenVSX Extensions
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.
@sdcx/image-crop
Advanced tools
ImageCropView 是一个 React Native 原生 UI 组件,用于头像裁剪以及图片裁剪,同时支持图像主体识别后设置需要裁剪的主体区域。
yarn add @sdcx/image-crop
# &
pod install
<ImageCropView
ref={imageCropViewRef}
style={'your style'}
fileUri={'your file uri'}
cropStyle={'circular' | 'default'}
onCropped={(uri: string) => {}}
objectRect={objectRect}
/>
默认default为裁剪矩形,若需要裁剪圆形头像,则设为circular;
objectRect可设置默认的图片裁剪区域,且当cropStyle为default时有效。
objectRect的四个属性分别是(单位都是像素px):
imageCropViewRef.crop()
然后裁剪成功后会在onCropped属性中回调裁剪后图片的uri;
FAQs
A React Native ui component for image crop.
We found that @sdcx/image-crop 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.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.

Product
Bringing supply chain security to the next generation of JavaScript package managers

Product
A safer, faster way to eliminate vulnerabilities without updating dependencies