Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular Pattern, Redraw and Gulp Features #26

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jr-crop

A simple ionic plugin to crop your images, inspired by whatsapp and telegram.
* Specifiy width and height of target
* Doesn't actually scale the image, only returns a cropped version. Since the quality of images while scaling is inconsistent it's up to the developper to implement this, preferably on the server.
* Supports image scaling by using the resample_hermite algorithm (Courtesy of viliusle, https://github.com/viliusle/Hermite-resize). See options.
* Returns a canvas element with the new cropped image.

![example](/example.jpg)
Expand Down Expand Up @@ -35,13 +35,20 @@ $jrCrop.crop({
});
```

Additionally you can add a title in the footer.
##Options
You can add the following options when you call 'crop':
```
$jrCrop.crop({
url: url,
width: 200,
height: 200,
title: 'Move and Scale'
title: 'Move and Scale' //additional title,
cancelText: 'Abort', //default is: 'Cancel'
chooseText: 'OK', //default is 'Choose'
allowRotation: true, //default is false
buttonLocation: 'header', //default is 'footer'
resizeWidth: 75, //if present then the image will be scaled to given width. Also used for resizeHight if that option is not present.
resizeHight: 75, //if present then the image will be scaled to given height. Also used for resizeWidth if that option is not present.
});
```

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
"devDependencies": {
"ionic": "1.1.1"
}
}
}
Loading