npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@vahesaroyan/react-native-image-editor

v1.0.1

Published

React Native image editor

Downloads

48

Readme

@vahesaroyan/react-native-image-editor

React Native image editor ( Android / iOS )

What can this app do:

  • Scaling
  • Cropping
  • Rotating
  • Single and multi editing
  • Remembers your actions
  • Choose custom aspect ratio or standard
  • Works very fast with beautiful animations
  • Works on a tablet

The main feature of the application is that all changes do not affect the original, but only collect parameters by which, when editing is completed, it will be possible to crop on the server side.

Installation

npm:

npm install @vahesaroyan/react-native-image-editor

yarn:

yarn add @vahesaroyan/react-native-image-editor

Kotlin

Since version 2.0.0 RNGH has been rewritten with Kotlin. The default version of the Kotlin plugin used in this library is 1.5.20.

If you need to use a different Kotlin version, set the kotlinVersion ext property in android/build.gradle file and RNGH will use that version:

buildscript {
    ext {
        ...
          kotlinVersion = "1.6.21"
    }
}

Babel plugin

Add Reanimated's and Svg's babel plugin to your babel.config.js:

 module.exports = {
    ...
      plugins: [
        ['react-native-reanimated/plugin'],
      ],
  };

If you're in a CocoaPods project, make sure to install pods before you run your app:

yarn
cd ios && pod install
react-native start --reset-cache

Usage

import { Editor } from "@vahesaroyan/react-native-image-editor";

const images = ['https://...', 'https://...', ...];

<Editor
  images={images}
  onPressCreate={ (e) => console.log(e) } // In the logs you will receive an object with settings for changed images and the settings of the editor itself .If the image has not been changed, the original data will be returned.
  onPressGoBack={ () => navigation.goBack() } // By clicking on the back button, you can return to the previous page or close the modal window
  initialSettingsForBackend={ null } // If you pass here an object with settings for the image and the editor, then you can start editing from the last edit
/>

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

Props

| Property | Type | Description | |---------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------| | images | string [ ] | Initial images for editing. | | onPressCreate | func ( e ) => { settings: { height: number; width: number; boxHeight: number; boxWidth: number; x: number; y: number; rotate: number}, editorSettings: { aspect: { id: number; name: string; value: { x: number; y: number } } or null; minScale: number; proportion: number; top: number; bottom: number; left: number; right: number; scale: number; rotate: number; x: number; y: number }} [ ] | When you click on the Create Cast button, the function returns an array with the edited coordinates for all images and editor settings. | | initialSettingsForBackend | { settings: { height: number; width: number; boxHeight: number; boxWidth: number; x: number; y: number; rotate: number}, editorSettings: { aspect: { id: number; name: string; value: { x: number; y: number } } or null; minScale: number; proportion: number; top: number; bottom: number; left: number; right: number; scale: number; rotate: number; x: number; y: number }} [ ] ( default null ) | If you need to edit the modified image. | | aspectItemsData | { id: number; name: string; value: { x: number; y: number }} [ ] | If you need to change default aspect ratios. | | | onPressGoBack | func ( ) => void | By clicking on the Back button, you can navigate go back. | | iconCrop, iconPalette, iconRotate, iconRedo, iconUndo, iconReset | ImageProps['source'] | To change icons. | | aspectRatioBtnText, backgroundColorBtnText, createBtnText | string | To change buttons text. | | editorTitle | string | To change editor title. |

License

MIT