Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/monkeymars/ng-image-compress
compress jpeg or png files using angularjs on client side - using HTML5 Canvas & File API (based off of a J-I-C project on github).
https://github.com/monkeymars/ng-image-compress
Last synced: 3 months ago
JSON representation
compress jpeg or png files using angularjs on client side - using HTML5 Canvas & File API (based off of a J-I-C project on github).
- Host: GitHub
- URL: https://github.com/monkeymars/ng-image-compress
- Owner: monkeymars
- Fork: true (sammychl/ng-image-compress)
- Created: 2015-12-07T13:24:46.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-01-06T22:24:14.000Z (almost 10 years ago)
- Last Synced: 2023-04-01T16:02:45.763Z (over 1 year ago)
- Language: JavaScript
- Size: 266 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ng-image-compress
=================######This Angular directive compresses jpeg or png files using angularjs on client side. It uses using HTML5 Canvas & File API. The compression algorithm is based off of the J-I-C project on github.
###### There's an old angularjs-imageupload-directive from mischi package that claims to do image compress, but somehow it doesn't compress images nearly as well as the J-I-C project's. Thus, this repo here. Some of the code was borrowed from the above too, so u will find similarities. Note: I have absolutely no clue why J-I-C's compression is better.
-----------Steps:
1. bower install ng-image-compress then add ng-image-compress.js directive as a dependency in your index.html
2. add image tag to ur html element. eg. image="myAwesomeImage"
3. add to ur html page to see the compressed photo.
4. do whatever u want to do with the compressed file. eg. use angular-file-upload package to upload it.
Example:``
**Adjustable: resize-max-height, resize-max-width, resize-quality, resize-type
For demo, u can just clone this repo and then run index.html. thanks!!