All Projects → SparrowJang → Ngimageeditor

SparrowJang / Ngimageeditor

Licence: mit
This is a image editor for angular.It can cut image.

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Ngimageeditor

Generator Angular Auto Admin Loopback
Generator for automatic CRUD angular backend for loopback apps and apis
Stars: ✭ 32 (-27.27%)
Mutual labels:  angularjs
Samay
Command line Time tracking and reporting. Built using Go(programming language) and protocol buffers.
Stars: ✭ 37 (-15.91%)
Mutual labels:  angularjs
Electron Boilerplate
An Electron boilerplate project using AngularJS
Stars: ✭ 40 (-9.09%)
Mutual labels:  angularjs
Todolist
📄 Task management web application built with AngularJS and Java EE.
Stars: ✭ 33 (-25%)
Mutual labels:  angularjs
Protokit
📱 A prototype kit for Ionic Framework
Stars: ✭ 36 (-18.18%)
Mutual labels:  angularjs
Trycode
Open-source realtime collaborative code editor on Babel, NodeJS, AngularJS, Socket.io, ACE - http://trycode.pw
Stars: ✭ 38 (-13.64%)
Mutual labels:  angularjs
Angular Gridster2
Angular gridster 2
Stars: ✭ 956 (+2072.73%)
Mutual labels:  angularjs
Softetheradmin
A Web UI for SoftEther VPN Server
Stars: ✭ 44 (+0%)
Mutual labels:  angularjs
Soqlbuilder
Node.js and AngularJs based Query Builder for Salesforce using OAuth2 and REST API
Stars: ✭ 37 (-15.91%)
Mutual labels:  angularjs
Ts Angular Jsonapi
JsonApi library for AngularJS + Typescript 👌
Stars: ✭ 39 (-11.36%)
Mutual labels:  angularjs
Smart Kyc
An opensource KYC web application
Stars: ✭ 34 (-22.73%)
Mutual labels:  angularjs
Angular Drag Scroll
Lightweight drag to scroll directive for AngularJS
Stars: ✭ 35 (-20.45%)
Mutual labels:  angularjs
Ng1bs4
AngularJS with Bootstrap 4
Stars: ✭ 39 (-11.36%)
Mutual labels:  angularjs
Advanced Directives With Angular Js
Advanced Directives with Angular JS - Code for the Screencast
Stars: ✭ 33 (-25%)
Mutual labels:  angularjs
Mean Angular4 Chat App
MEAN stack with Angular 4 Chat App
Stars: ✭ 41 (-6.82%)
Mutual labels:  angularjs
Checksheet Manager
Checksheet Manager for college checksheets. Created with AngularJS and Node/Express/MongoDB.
Stars: ✭ 31 (-29.55%)
Mutual labels:  angularjs
Onthefly
🔗 Generate TinySVG, HTML and CSS on the fly
Stars: ✭ 37 (-15.91%)
Mutual labels:  angularjs
Umbraco Fluidity
A fluent CRUD user interface generator for Umbraco
Stars: ✭ 44 (+0%)
Mutual labels:  angularjs
Pacbot
PacBot (Policy as Code Bot)
Stars: ✭ 1,017 (+2211.36%)
Mutual labels:  angularjs
Depli
A handsome JVM monitoring dashboard
Stars: ✭ 39 (-11.36%)
Mutual labels:  angularjs

ngImageEditor

demo image

This is a image editor for angular.It can cut image.

Dependency

  • angularjs

Demo

demo

Install

bower install ngImageEditor

or

npm install ng-image-editor

Support

  • IE9+
  • chrome
  • firefox

The input image is not cross domain.It is browser limit.

You can add this header to your server to resolve cross domain.

Access-Control-Allow-Origin: http://your.domain.com

Usage

Set some attrs of element.

<div img-src="imgSrc" ng-image-editor="imageEditor" selected="selected"></div>

Load a image for cut.

$scope.imgSrc='/images/head.jpeg';

Set a selected block size.

$scope.selected = {width:150,height:150,top:0,left:0};

Get a image data of selected block.

$scope.imageEditor.toDataURL({useOriginalImg:true, imageType:"image/png"});

Method

refresh

Resize and render canvas

Parameter

enabledResizeSelector(optonal:default false)

Set a resize selector to be enabled.

Create a attribute to tag.

enabled-resize-selector="enableResizeSelector"

The enabled is true by set.

$scope.enabledResizeSelector = true;

imgSrc

Set a editor image.

Selected

Set top、left、width and height for selector.

toDataURL(opts:Object)

opts.useOriginalImg

opts.imageType

output a base64 string

aspectRatio

Set the aspect ratio

aspect-ratio="16:9"

Set the aspect ratio to 2:2 if you need to be square

<div selected="selected" img-src="imgSrc" ng-image-editor="imageEditor" ng-init="imgSrc='/images/head.jpeg'; selected = {width:50,height:50,top:0,left:0};" aspect-ratio="2:2" > </div>

Event

on-image-change( imgSize ) Event

The image is loaded and rendered.

Run

Clone this project.

git clone https://github.com/SparrowJang/ngImageEditor
 
cd ngImageEditor

Install the express framework and grunt modules.

npm install

run a server:

grunt server

Finally,open your brower,enter http://localhost:3000/index.html.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].