Skip to content

Commit 2516215

Browse files
author
dengwen
committed
update readme
1 parent d51fb21 commit 2516215

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ const params = {
4242
width: canvas.width,
4343
height: canvas.height,
4444
boundaryValue,
45-
mockMovePx
45+
mockMovePx,
46+
onload,
4647
}
4748
const imageColorUtils = new ImageColorUtils(params)
4849
```
@@ -54,6 +55,7 @@ width | 画板宽度 | number | - | false (不传参将根据图片宽高自适
5455
height | 画板高度 | number | - | false (不传参将根据图片宽高自适应,origin 为 ImageBitmap / HTMLImageElemen,必填)
5556
mockMovePx | 边界扫描距离(最大边界扫描距离, 扫描方向由内向外) | number | 30 | false
5657
boundaryValue | 色彩边界阈值(作用于色值相似度对比, 阈值越高,相似条件越高) | number | 10 | false
58+
onload | 加载完成 | ()=>void | - | false
5759
##### Returns
5860
Desc | Type
5961
-------- | --------

build/index.es.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,6 @@ class ImageColorUtils {
448448
res.push(ImageColorUtils.getMedian(item));
449449
}
450450
});
451-
console.log('similarColorsMap', this.imageData.data.length, this.canvas.width, this.canvas.height);
452451
return {
453452
rgb: res.map((item) => `rgba(${item.join(',')})`),
454453
hex: res.map((item) => rgb2hex(item)),

build/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,6 @@ class ImageColorUtils {
452452
res.push(ImageColorUtils.getMedian(item));
453453
}
454454
});
455-
console.log('similarColorsMap', this.imageData.data.length, this.canvas.width, this.canvas.height);
456455
return {
457456
rgb: res.map((item) => `rgba(${item.join(',')})`),
458457
hex: res.map((item) => rgb2hex(item)),

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "image-color-utils",
3-
"version": "1.2.5",
3+
"version": "1.2.6",
44
"description": "Operate image pixels, such as pickup color, color contrast, etc",
55
"main": "./build/index.js",
66
"module": "./build/index.es.js",

0 commit comments

Comments
 (0)