image-js 0.35.6 → 0.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -196,7 +196,11 @@ export declare class Image {
196
196
  options?: { border?: Array<number> },
197
197
  ): Array<number>;
198
198
 
199
- // cannyEdge
199
+ cannyEdge(options?: {
200
+ gaussianBlur?: number;
201
+ lowThreshold?: number;
202
+ highThreshold?: number;
203
+ }): Image;
200
204
  convolution(kernel: Kernel, options?: ConvolutionOptions): Image;
201
205
  extract(
202
206
  mask: Image,
@@ -95,7 +95,10 @@ function loadPNG(data) {
95
95
  return new _Image.default(png.width, png.height, png.data, {
96
96
  components,
97
97
  alpha,
98
- bitDepth: png.depth
98
+ bitDepth: png.depth,
99
+ meta: {
100
+ text: png.text
101
+ }
99
102
  });
100
103
  }
101
104
  function loadPNGFromPalette(png) {
@@ -10,6 +10,9 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
10
10
  * @memberof Image
11
11
  * @instance
12
12
  * @param {object} [options]
13
+ * @param {number} [options.gaussianBlur=1.1] - Sigma parameter for the gaussian filter step
14
+ * @param {number} [options.lowThreshold=10] - Low threshold for the hysteresis procedure
15
+ * @param {number} [options.highThreshold=30] - High threshold for the hysteresis procedure
13
16
  * @return {Image}
14
17
  */
15
18
  function cannyEdge(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "image-js",
3
- "version": "0.35.6",
3
+ "version": "0.36.1",
4
4
  "description": "Image processing and manipulation in JavaScript",
5
5
  "keywords": [
6
6
  "image",
@@ -84,7 +84,7 @@
84
84
  "fast-bmp": "^2.0.1",
85
85
  "fast-jpeg": "^1.0.1",
86
86
  "fast-list": "^1.0.3",
87
- "fast-png": "^6.1.0",
87
+ "fast-png": "^6.2.0",
88
88
  "has-own": "^1.0.1",
89
89
  "image-type": "^4.1.0",
90
90
  "is-array-type": "^1.0.0",
@@ -109,6 +109,7 @@ function loadPNG(data) {
109
109
  components,
110
110
  alpha,
111
111
  bitDepth: png.depth,
112
+ meta: { text: png.text },
112
113
  });
113
114
  }
114
115
 
@@ -4,6 +4,9 @@ import cannyEdgeDetector from 'canny-edge-detector';
4
4
  * @memberof Image
5
5
  * @instance
6
6
  * @param {object} [options]
7
+ * @param {number} [options.gaussianBlur=1.1] - Sigma parameter for the gaussian filter step
8
+ * @param {number} [options.lowThreshold=10] - Low threshold for the hysteresis procedure
9
+ * @param {number} [options.highThreshold=30] - High threshold for the hysteresis procedure
7
10
  * @return {Image}
8
11
  */
9
12
  export default function cannyEdge(options) {