Skip to content

Commit 90ef22e

Browse files
committed
샤픈기능 추가
1 parent 920ed09 commit 90ef22e

17 files changed

+290
-114
lines changed

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,16 @@ imageResize.play('image.jpg');
5858

5959
### Basic
6060

61-
| Name | Type | Default | Description |
62-
|:----:|:------:|:-------:|:------------|
63-
| quality | number | `.75` | jpg 이미지일때의 이미지 퀄리티값 |
64-
| format | string | `jpg` | 출력할 포맷. `png,jpg,webp` |
65-
| outputType | string | `base64 ` | 출력방식. `base64,canvas,blob` |
66-
| width | number | `320` | 조절할 가로사이즈 |
67-
| height | number | `null` | 조절할 세로 사이즈. 한쪽값이 있는쪽으로 기준이 되어 조절한다. |
68-
| reSample | number | `2` | 리새플링 횟수. 수치가 높을수록 경계선이 부드러워지지만 처리속도는 느려진다. 최대 4까지 적용된다. |
69-
| bgColor | string | `#ffffff` | 캔버스 배경색 |
61+
| Name | Type | Default | Description |
62+
|:----------:|:------:|:---------:|:--------------------------------------------------------|
63+
| quality | number | `.75` | jpg 이미지일때의 이미지 퀄리티값 |
64+
| format | string | `jpg` | 출력할 포맷. `png,jpg,webp` |
65+
| outputType | string | `base64` | 출력방식. `base64,canvas,blob` |
66+
| width | number | `320` | 조절할 가로사이즈 |
67+
| height | number | `null` | 조절할 세로 사이즈. 한쪽값이 있는쪽으로 기준이 되어 조절한다. |
68+
| reSample | number | `2` | 리새플링 횟수. 수치가 높을수록 경계선이 부드러워지지만 처리속도는 느려진다. 최대 4까지 적용된다. |
69+
| bgColor | string | `#ffffff` | 캔버스 배경색 |
70+
| sharpen | number | `0.75` | 선명하게 강도 |
7071

7172

7273
## Methods
@@ -182,9 +183,9 @@ imageResize.output(document.getElementById('canvas')).then();
182183
try {
183184
const imageResize = new ImageResize();
184185
let res = await imageResize.updateOptions({ width: 640 }).get('image.jpg');
185-
res = await imageResize.resize(canvas);
186+
res = await imageResize.resize(res);
186187
res = await ready(res);
187-
res = await imageResize.output(canvas);
188+
res = await imageResize.output(res);
188189
console.log(res);
189190
} catch (e) {
190191
console.error(error);

docs/index-127441c7.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/index-3603249b.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/index-ccf44148.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)