From b0e836d5404e0db09f804dbee4b26a3363f1f83f Mon Sep 17 00:00:00 2001 From: Roope Hovi Date: Sat, 28 Feb 2015 18:04:50 +0200 Subject: [PATCH] Add ahdin module that provides Ahdin image compression factory. --- .gitignore | 2 + README.md | 76 +++++++++++- bower.json | 33 ++++++ circle.yml | 10 ++ dist/ahdin.js | 180 ++++++++++++++++++++++++++++ dist/ahdin.min.js | 1 + dist/blob-util.min.js | 1 + dist/load-image.all.min.js | 1 + gulpfile.js | 36 ++++++ karma.conf.js | 21 ++++ package.json | 36 ++++++ src/ahdin.constants.js | 8 ++ src/ahdin.factory.js | 165 ++++++++++++++++++++++++++ src/ahdin.module.js | 5 + test/ahdin.factory.spec.js | 236 +++++++++++++++++++++++++++++++++++++ test/test-image.jpg | Bin 0 -> 1827663 bytes 16 files changed, 810 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 bower.json create mode 100644 circle.yml create mode 100644 dist/ahdin.js create mode 100644 dist/ahdin.min.js create mode 100644 dist/blob-util.min.js create mode 100644 dist/load-image.all.min.js create mode 100644 gulpfile.js create mode 100644 karma.conf.js create mode 100644 package.json create mode 100644 src/ahdin.constants.js create mode 100644 src/ahdin.factory.js create mode 100644 src/ahdin.module.js create mode 100644 test/ahdin.factory.spec.js create mode 100644 test/test-image.jpg diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a088b6f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules +bower_components diff --git a/README.md b/README.md index 6f35b16..66d45c6 100644 --- a/README.md +++ b/README.md @@ -1 +1,75 @@ -# angular-ahdin +angular-ahdin +================ +Lossy compression module for AngularJS applications. It takes image `File`s or `Blob`s and compresses them to `Blob`s. It also fixes image orientation according to image's EXIF metadata. + +Dependencies +----- +- AngularJS >=1.2.* +- [blob-util](https://github.com/nolanlawson/blob-util) (comes blundled with angular-ahdin) +- [load-image](https://github.com/blueimp/JavaScript-Load-Image) (comes blundled with angular-ahdin) + +Installation +----------- +``` +$ bower install --save angular-ahdin +``` + +Setting up the module +---------- +After installing the package make sure that the module `ahdin` is defined as your app's dependency. + +```html + + + + +