exif-rotate-js
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "exif-rotate-js", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "When you use input file, you can see preview images.", | ||
@@ -5,0 +5,0 @@ "main": "lib/exif-rotate.js", |
@@ -13,3 +13,3 @@ [![Build Status](https://travis-ci.org/hanagejet/exif-rotate-js.svg?branch=master)](https://travis-ci.org/hanagejet/exif-rotate-js) | ||
## HOW IT'S WORKS | ||
## HOW DOES IT WORK? | ||
@@ -20,18 +20,4 @@ ``` | ||
```js | ||
var ExifRotate = require('exif-rotate-js'); | ||
ExifRotate.showPreviewImage(img, { | ||
max_size: 700, | ||
}); | ||
``` | ||
When you need detail, please see [example page](https://github.com/hanagejet/exif-rotate-js/tree/master/example). | ||
👆show detail `sample.js` | ||
```html | ||
<div id="{options.default_container_id}"> | ||
here is uploaded images | ||
</div> | ||
<input type="file" id="#sum_id" multiple> <!-- can use multiple --> | ||
``` | ||
## METHODS | ||
@@ -42,9 +28,7 @@ | ||
```js | ||
showPreviewImage(img, options); | ||
showPreviewImage(file, options); | ||
``` | ||
can show preview image. | ||
Can show preview image. | ||
like this: | ||
<img src="https://cloud.githubusercontent.com/assets/4067007/19226722/fc509f20-8e63-11e6-86a0-392a06ec887d.png" width="320"> | ||
@@ -56,33 +40,30 @@ | ||
```js | ||
getBase64String(img, options); | ||
getBase64String(file, options); | ||
``` | ||
can get base64 encode string. | ||
Can get base64 encode string. | ||
like this console.log: | ||
<img src="https://cloud.githubusercontent.com/assets/4067007/19226758/92e519fc-8e64-11e6-8fd4-20556ae6dbb8.png" width="500"> | ||
### Arguments | ||
#### Arguments | ||
| Name | Type | Description | | ||
| ------------- |:--------:|:-------------:| | ||
| img | node | img element. `new Image();` | | ||
| file | fileList | Just write event target files when input file event | | ||
| options | Object | [Method options.](#options) | | ||
#### Options | ||
### Options | ||
See `lib/configs.js` | ||
See `src/configs.js` | ||
### max_size | ||
#### max_size | ||
- Type: number | ||
- Default: 720 | ||
This is max image size. | ||
This is max image size. Can get the size you want. | ||
### default_container_id | ||
#### default_container_id | ||
- Type: string | ||
- Default: container | ||
This is container element id. | ||
This is container element id that is append preview image. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
181221
66