@kemu-io/edge-runtime 0.1.16 → 0.1.19

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kemu-io/edge-runtime",
3
3
  "type": "module",
4
- "version": "0.1.16",
4
+ "version": "0.1.19",
5
5
  "description": "Kemu Edge runtime for running Kemu recipes",
6
6
  "author": "Kemu Pty Ltd",
7
7
  "main": "runner.js",
package/runner.d.ts CHANGED
@@ -148,6 +148,14 @@ export declare const utils: {
148
148
  * @returns the loaded image as ImageData
149
149
  */
150
150
  loadImageFile: (filePath: string | URL | Buffer | ArrayBufferLike | Uint8Array | Readable) => Promise<ImageData$1>;
151
+ /**
152
+ * Encodes raw ImageData type to a common image file format.
153
+ * @param imageData the ImageData to encode.
154
+ * @param format the format to encode the image in.
155
+ * @param quality the quality of the image to encode. Only applies to jpeg and webp formats.
156
+ * @returns the encoded image as a buffer.
157
+ */
158
+ encodeImageData: (imageData: ImageData$1, format?: "png" | "jpeg" | "webp", quality?: number) => Promise<Buffer>;
151
159
  };
152
160
  declare const _default: {
153
161
  start: (config?: {