Skip to content

Commit

Permalink
0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorm committed Jan 14, 2024
1 parent 6d598d9 commit 2d177c1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
13 changes: 13 additions & 0 deletions docs/interfaces/ChafaModule.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ An object that contains the Chafa WebAssembly module API.

**decodeImage**: (`image`: `ArrayBuffer` \| [`ImageDataLike`](../README.md#imagedatalike), `callback`: (`error`: ``null``, `image`: [`ImageDataLike`](../README.md#imagedatalike)) => `void`(`error`: `unknown`, `image`: ``null``) => `void`) => `void`

Decodes a PNG, JPEG or WebP image into an ImageDataLike object.
If an already decoded image is specified, it will be left as is.

#### Type declaration

▸ (`image`, `callback`): `void`
Expand All @@ -49,6 +52,8 @@ ___

**imageToAnsi**: (`image`: `ArrayBuffer` \| [`ImageDataLike`](../README.md#imagedatalike), `config`: [`PartialChafaConfig`](../README.md#partialchafaconfig), `callback`: (`error`: ``null``, `data`: \{ `ansi`: `string` ; `config`: [`ReadonlyChafaConfig`](../README.md#readonlychafaconfig) }) => `void`(`error`: `unknown`, `data`: \{ `ansi`: ``null`` ; `config`: ``null`` }) => `void`) => `void`

Converts an image into an ANSI string.

#### Type declaration

▸ (`image`, `config`, `callback`): `void`
Expand All @@ -73,6 +78,8 @@ ___

**imageToCanvas**: (`image`: `ArrayBuffer` \| [`ImageDataLike`](../README.md#imagedatalike), `config`: [`PartialChafaConfig`](../README.md#partialchafaconfig), `callback`: (`error`: ``null``, `data`: \{ `canvas`: `number` ; `config`: [`ReadonlyChafaConfig`](../README.md#readonlychafaconfig) }) => `void`(`error`: `unknown`, `data`: \{ `canvas`: ``null`` ; `config`: ``null`` }) => `void`) => `void`

Converts an image into a Chafa canvas pointer.

#### Type declaration

▸ (`image`, `config`, `callback`): `void`
Expand All @@ -97,6 +104,8 @@ ___

**imageToConsoleLogArgs**: (`image`: `ArrayBuffer` \| [`ImageDataLike`](../README.md#imagedatalike), `config`: [`PartialChafaConfig`](../README.md#partialchafaconfig), `callback`: (`error`: ``null``, `data`: \{ `args`: `string`[] ; `config`: [`ReadonlyChafaConfig`](../README.md#readonlychafaconfig) }) => `void`(`error`: `unknown`, `data`: \{ `args`: ``null`` ; `config`: ``null`` }) => `void`) => `void`

Converts an image into an array of `console.log` arguments.

#### Type declaration

▸ (`image`, `config`, `callback`): `void`
Expand All @@ -121,6 +130,8 @@ ___

**imageToHtml**: (`image`: `ArrayBuffer` \| [`ImageDataLike`](../README.md#imagedatalike), `config`: [`PartialChafaConfig`](../README.md#partialchafaconfig), `callback`: (`error`: ``null``, `data`: \{ `config`: [`ReadonlyChafaConfig`](../README.md#readonlychafaconfig) ; `html`: `string` }) => `void`(`error`: `unknown`, `data`: \{ `config`: ``null`` ; `html`: ``null`` }) => `void`) => `void`

Converts an image into an HTML string.

#### Type declaration

▸ (`image`, `config`, `callback`): `void`
Expand All @@ -145,6 +156,8 @@ ___

**imageToMatrix**: (`image`: `ArrayBuffer` \| [`ImageDataLike`](../README.md#imagedatalike), `config`: [`PartialChafaConfig`](../README.md#partialchafaconfig), `callback`: (`error`: ``null``, `data`: \{ `config`: [`ReadonlyChafaConfig`](../README.md#readonlychafaconfig) ; `matrix`: `number`[][][] }) => `void`(`error`: `unknown`, `data`: \{ `config`: ``null`` ; `matrix`: ``null`` }) => `void`) => `void`

Converts an image into a matrix of characters.

#### Type declaration

▸ (`image`, `config`, `callback`): `void`
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chafa-wasm",
"version": "0.0.4",
"version": "0.1.0",
"description": "Chafa WebAssembly module to convert images to text",
"keywords": [
"chafa",
Expand Down

0 comments on commit 2d177c1

Please sign in to comment.