{"id":15018587,"url":"https://github.com/peterstaev/nativescript-photo-editor","last_synced_at":"2025-10-23T19:31:12.539Z","repository":{"id":57308692,"uuid":"134406767","full_name":"PeterStaev/nativescript-photo-editor","owner":"PeterStaev","description":"🎨 Easily edit an image in your NativeScript app (crop, draw, etc)","archived":false,"fork":false,"pushed_at":"2019-07-29T21:00:05.000Z","size":15978,"stargazers_count":44,"open_issues_count":7,"forks_count":15,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-25T05:01:35.982Z","etag":null,"topics":["android","crop","draw","ios","nativescript","photo-editing","photo-editor","ui"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PeterStaev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-22T11:41:42.000Z","updated_at":"2023-11-07T12:48:46.000Z","dependencies_parsed_at":"2022-08-28T23:30:52.363Z","dependency_job_id":null,"html_url":"https://github.com/PeterStaev/nativescript-photo-editor","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterStaev%2Fnativescript-photo-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterStaev%2Fnativescript-photo-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterStaev%2Fnativescript-photo-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterStaev%2Fnativescript-photo-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PeterStaev","download_url":"https://codeload.github.com/PeterStaev/nativescript-photo-editor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219867720,"owners_count":16554395,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","crop","draw","ios","nativescript","photo-editing","photo-editor","ui"],"created_at":"2024-09-24T19:52:09.112Z","updated_at":"2025-10-23T19:31:04.868Z","avatar_url":"https://github.com/PeterStaev.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"**This repo only supports NativeScript pre-6.0. The latest version of the plugin supporting NS 6+ is availble as part of [ProPlugins](https://proplugins.org).**\n# NativeScript Photo Editor\n[![Build Status](https://travis-ci.com/PeterStaev/nativescript-photo-editor.svg?branch=master)](https://travis-ci.com/PeterStaev/nativescript-photo-editor)\n[![npm downloads](https://img.shields.io/npm/dm/nativescript-photo-editor.svg)](https://www.npmjs.com/package/nativescript-photo-editor)\n[![npm downloads](https://img.shields.io/npm/dt/nativescript-photo-editor.svg)](https://www.npmjs.com/package/nativescript-photo-editor)\n[![npm](https://img.shields.io/npm/v/nativescript-photo-editor.svg)](https://www.npmjs.com/package/nativescript-photo-editor)\n\nA NativeScript photo editor. It allows you to crop, draw something on your image or add some text. \n\n## Screenshot\n![Screenshot of iOS](https://raw.githubusercontent.com/PeterStaev/nativescript-photo-editor/master/docs/editor-ios.gif)\n\n## Installation\nRun the following command from the root of your project:\n\n`tns plugin add nativescript-photo-editor`\n\nThis command automatically installs the necessary files, as well as stores nativescript-photo-editor as a dependency in your project's `package.json` file.\n\n## Configuration\nThere is no additional configuration needed!\n\n## API\n### Methods\n* **editPhoto(options): Promise**  \nOpens the photo editor with the given options. If the user accepts the edited image the promise is resolved with an instance of the new `ImageSource`. If the user cancels the edit the promise will be rejected. \n\n## Usage\nSimply create an instance of the photo editor, pass the image you want to edit and which editor controls you **don't** want to use (if any) an that's it!\n```ts\nimport { PhotoEditor, PhotoEditorControl } from \"nativescript-photo-editor\";\n\nconst photoEditor = new PhotoEditor();\n\nphotoEditor.editPhoto({\n    imageSource: originalImage.imageSource,\n    hiddenControls: [\n        PhotoEditorControl.Save,\n        PhotoEditorControl.Crop,\n    ],\n}).then((newImage: ImageSource) =\u003e {\n    // Here you can save newImage, send it to your backend or simply display it in your app\n    resultImage.imageSource = newImage;\n}).catch((e) =\u003e {\n    console.error(e);\n});\n```\n\n## Usage in Angular\nThere is no difference in usage between Core and Angular. So you can refer to the above usage examples on how to use this plugin with Angular. \n\n## Demos\nThis repository includes a plain NativeScript demo. In order to run it execute the following in your shell:\n```shell\n$ git clone https://github.com/peterstaev/nativescript-photo-editor\n$ cd nativescript-photo-editor\n$ npm install\n$ npm run demo-ios\n```\nThis will run the plain NativeScript demo project on iOS. If you want to run it on Android simply use the `-android` instead of the `-ios` sufix. \n\n## Donate\n[![Donate](https://img.shields.io/badge/paypal-donate-brightgreen.svg)](https://bit.ly/2AS9QKB)\n\n`bitcoin:14fjysmpwLvSsAskvLASw6ek5XfhTzskHC`\n\n![Donate](https://www.tangrainc.com/qr.png)\n\n## Credits\n* For iOS this uses the `iOSPhotoEditor` pod (https://cocoapods.org/pods/iOSPhotoEditor)\n* For Android uses adjusted code with added cropping from https://github.com/eventtus/photo-editor-android \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterstaev%2Fnativescript-photo-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterstaev%2Fnativescript-photo-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterstaev%2Fnativescript-photo-editor/lists"}