
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
sb-image-editor
Advanced tools
This is a image editor for angular.It can cut image.
##Dependency
##Demo
##Install
bower install ngImageEditor
or
npm install ng-image-editor
##Support
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();
##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
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.
FAQs
This is a image editor for angular. It can cut image.
The npm package sb-image-editor receives a total of 2 weekly downloads. As such, sb-image-editor popularity was classified as not popular.
We found that sb-image-editor 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.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.