Skip to content

Commit

Permalink
update demo.html and README to match new impl
Browse files Browse the repository at this point in the history
  • Loading branch information
Mischi committed May 17, 2013
1 parent ef25fcc commit 87dce9a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
20 changes: 13 additions & 7 deletions README.md
Expand Up @@ -21,6 +21,7 @@ The image object has the following properties:

- file
- url
- dataURL

### Single image with resizing

Expand All @@ -30,15 +31,17 @@ The image object has the following properties:
resize-max-width="250"
resize-quality="0.7" />
Original <img ng-show="image2" ng-src="{{image2.url}}" type="{{image2.file.type}}" />
Resized <img ng-show="image2" ng-src="{{image2.resized.url}}" />
Resized <img ng-show="image2" ng-src="{{image2.resized.dataURL}}" />
```

The image object has the following properties:

- file
- url
- dataURL
- resized
- url
- dataURL
- type

### Multiple images with resizing

Expand All @@ -49,23 +52,26 @@ The image object has the following properties:
resize-max-width="250"
resize-quality="0.7" />
Originals <img ng-repeat="img in images" ng-src="{{img.url}}" type="{{img.file.type}}" />
Resized <img ng-repeat="img in images" ng-src="{{img.resized.url}}" />
Resized <img ng-repeat="img in images" ng-src="{{img.resized.dataURL}}" />
```

When used with multiple the image object is always an array of objects with the following properties:

- file
- url
- dataURL
- resized
- url
- dataURL
- type

See [demo.html](demo.html) for more concrete examples.

### Optional Parameter:

- resize-quality
- resize-max-height
- resize-max-width
- resize-quality (default is 0.7)
- resize-type (default is 'image/jpg')
- resize-max-height (default is 300)
- resize-max-width (default is 250)


## Features
Expand Down
7 changes: 3 additions & 4 deletions demo.html
Expand Up @@ -34,7 +34,7 @@ <h2>Single image with resizing</h2>
<p>Original</p>
<img ng-show="image2" ng-src="{{image2.url}}" type="{{image2.file.type}}"/>
<p>Resized</p>
<img ng-show="image2" ng-src="{{image2.resized.url}}" type="{{image2.resized.blob.type}}"/>
<img ng-show="image2" ng-src="{{image2.resized.dataURL}}"/>
<button type="submit" ng-click="single(image2.resized)" disabled>Add</button>
</div>
<hr />
Expand Down Expand Up @@ -77,7 +77,7 @@ <h2>Multiple images with resizing</h2>
<p>Originals</p>
<img ng-repeat="img in images4" ng-src="{{img.url}}" type="{{img.file.type}}"/>
<p>Resized</p>
<img ng-repeat="img in images4" ng-src="{{img.resized.url}}" type="{{img.resized.blob.type}}"/>
<img ng-repeat="img in images4" ng-src="{{img.resized.dataURL}}" />
<button type="submit" disabled>Add</button>
</div>
<hr />
Expand All @@ -86,8 +86,7 @@ <h2>Multiple images with resizing</h2>
<p>Uploaded Image / Size: {{sizeInBytes}} Bytes</p>
<img ng-src="{{uploadedImgSrc}}" />

<script src="javascripts/angular.min.js" " type="text/javascript"></script>
<script src="javascripts/canvas-to-blob.min.js" type="text/javascript"></script>
<script src="javascripts/angular.min.js" type="text/javascript"></script>
<script type="text/javascript">
angular.module('imageuploadDemo', ['imageupload'])
.controller('DemoCtrl', function($scope, $http) {
Expand Down

0 comments on commit 87dce9a

Please sign in to comment.