Skip to content

Commit

Permalink
apidocs
Browse files Browse the repository at this point in the history
  • Loading branch information
cancerberoSgx committed Nov 17, 2018
1 parent 8afda0e commit 85af9d3
Show file tree
Hide file tree
Showing 13 changed files with 73 additions and 71 deletions.
64 changes: 33 additions & 31 deletions apidocs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,17 @@ else {

**Ƭ Command**: *( `string` | `number`)[]*

*Defined in [execute.ts:7](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/execute.ts#L7)*
*Defined in [execute.ts:7](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/execute.ts#L7)*

___
<a id="executecommand"></a>

### ExecuteCommand

**Ƭ ExecuteCommand**: * [Command](#command)[] &#124; `string`[] &#124; `string`
**Ƭ ExecuteCommand**: * [Command](#command)[] &#124; [Command](#command) &#124; `string`
*

*Defined in [execute.ts:49](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/execute.ts#L49)*
*Defined in [execute.ts:49](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/execute.ts#L49)*

Commands could have the following syntaxes:

Expand Down Expand Up @@ -155,7 +155,7 @@ ___

**● builtInImageNames**: *`string`[]* = ['rose:', 'logo:', 'wizard:', 'granite:', 'netscape:']

*Defined in [util/imageBuiltIn.ts:5](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/util/imageBuiltIn.ts#L5)*
*Defined in [util/imageBuiltIn.ts:5](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/util/imageBuiltIn.ts#L5)*

___
<a id="knownsupportedreadwriteimageformats"></a>
Expand All @@ -182,7 +182,7 @@ ___
// 'rgb', // fails because MustSpecifyImageSize `to_rotate.rgb'
]

*Defined in [util/support.ts:8](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/util/support.ts#L8)*
*Defined in [util/support.ts:8](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/util/support.ts#L8)*

list of image formats that are known to be supported by wasm-imagemagick. See `spec/formatSpec.ts`

Expand All @@ -196,7 +196,7 @@ ___

**Call**(inputFiles: *[MagickInputFile](interfaces/magickinputfile.md)[]*, command: *`string`[]*): `Promise`<[MagickOutputFile](interfaces/magickoutputfile.md)[]>

*Defined in [magickApi.ts:27](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/magickApi.ts#L27)*
*Defined in [magickApi.ts:27](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/magickApi.ts#L27)*

[call](#call) shortcut that only returns the output files.

Expand All @@ -216,7 +216,7 @@ ___

**addExecuteListener**(l: *[ExecuteListener](interfaces/executelistener.md)*): `void`

*Defined in [execute.ts:125](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/execute.ts#L125)*
*Defined in [execute.ts:128](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/execute.ts#L128)*

**Parameters:**

Expand All @@ -233,7 +233,7 @@ ___

**arrayToCli**(command: * [Command](#command) &#124; [Command](#command)[]*): `string`

*Defined in [util/cli.ts:26](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/util/cli.ts#L26)*
*Defined in [util/cli.ts:26](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/util/cli.ts#L26)*

Generates a valid command line string from given `string[]` that is compatible with [call](#call). Works with multiple commands by separating them with new lines and support comand splitting in new lines using `\`. See [ExecuteCommand](#executecommand) for more information.

Expand All @@ -252,7 +252,7 @@ ___

**asCommand**(c: *[ExecuteCommand](#executecommand)*): [Command](#command)[]

*Defined in [util/cli.ts:89](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/util/cli.ts#L89)*
*Defined in [util/cli.ts:89](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/util/cli.ts#L89)*

Makes sure that given [ExecuteCommand](#executecommand), in whatever syntax, is transformed to the form `string[][]` that is compatible with [call](#call)

Expand All @@ -271,7 +271,9 @@ ___

**asExecuteConfig**(arg: * [ExecuteConfig](interfaces/executeconfig.md) &#124; [ExecuteCommand](#executecommand)*): [ExecuteConfig](interfaces/executeconfig.md)

*Defined in [execute.ts:88](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/execute.ts#L88)*
*Defined in [execute.ts:91](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/execute.ts#L91)*

Transform `configOrCommand: ExecuteConfig | ExecuteCommand` to a valid ExecuteConfig object

**Parameters:**

Expand All @@ -288,7 +290,7 @@ ___

**asInputFile**(f: *[MagickFile](interfaces/magickfile.md)*, name?: *`string`*): `Promise`<[MagickInputFile](interfaces/magickinputfile.md)>

*Defined in [util/file.ts:54](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/util/file.ts#L54)*
*Defined in [util/file.ts:54](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/util/file.ts#L54)*

**Parameters:**

Expand All @@ -306,7 +308,7 @@ ___

**asOutputFile**(f: *[MagickFile](interfaces/magickfile.md)*, name?: *`string`*): `Promise`<[MagickOutputFile](interfaces/magickoutputfile.md)>

*Defined in [util/file.ts:66](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/util/file.ts#L66)*
*Defined in [util/file.ts:66](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/util/file.ts#L66)*

**Parameters:**

Expand All @@ -324,7 +326,7 @@ ___

**blobToString**(blb: *`Blob`*): `Promise`<`string`>

*Defined in [util/file.ts:14](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/util/file.ts#L14)*
*Defined in [util/file.ts:14](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/util/file.ts#L14)*

**Parameters:**

Expand All @@ -341,7 +343,7 @@ ___

**buildImageSrc**(image: *[MagickFile](interfaces/magickfile.md)*, forceBrowserSupport?: *`boolean`*): `Promise`<`string`>

*Defined in [util/html.ts:21](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/util/html.ts#L21)*
*Defined in [util/html.ts:21](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/util/html.ts#L21)*

Return a string with the inline image content, suitable to be used to assign to an html img src attribute. See [loadImageElement](#loadimageelement).

Expand All @@ -361,7 +363,7 @@ ___

**buildInputFile**(url: *`string`*, name?: *`string`*): `Promise`<[MagickInputFile](interfaces/magickinputfile.md)>

*Defined in [util/file.ts:29](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/util/file.ts#L29)*
*Defined in [util/file.ts:29](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/util/file.ts#L29)*

Builds a new [MagickInputFile](interfaces/magickinputfile.md) by fetching the content of given url and optionally naming the file using given name or extracting the file name from the url otherwise.

Expand All @@ -381,7 +383,7 @@ ___

**call**(inputFiles: *[MagickInputFile](interfaces/magickinputfile.md)[]*, command: *`string`[]*): `Promise`<[CallResult](interfaces/callresult.md)>

*Defined in [magickApi.ts:57](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/magickApi.ts#L57)*
*Defined in [magickApi.ts:57](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/magickApi.ts#L57)*

Low level execution function. All the other functions like [execute](https://github.com/KnicKnic/WASM-ImageMagick/tree/sample-sinteractive-/apidocs#execute) ends up calling this one. It accept only one command and only in the form of array of strings.

Expand All @@ -401,7 +403,7 @@ ___

**cliToArray**(cliCommand: *`string`*): [Command](#command)[]

*Defined in [util/cli.ts:66](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/util/cli.ts#L66)*
*Defined in [util/cli.ts:66](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/util/cli.ts#L66)*

Generates a command in the form of `string[][]` that is compatible with [call](#call) from given command line string. This works for strings containing multiple commands in different lines. and also respect `\` character for continue the same command in a new line. See [ExecuteCommand](#executecommand) for more information.

Expand All @@ -420,7 +422,7 @@ ___

**compare**(img1: * [MagickFile](interfaces/magickfile.md) &#124; `string`*, img2: * [MagickFile](interfaces/magickfile.md) &#124; `string`*, fuzz?: *`number`*): `Promise`<`boolean`>

*Defined in [util/imageCompare.ts:6](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/util/imageCompare.ts#L6)*
*Defined in [util/imageCompare.ts:6](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/util/imageCompare.ts#L6)*

Compare the two images and return true if they are equal visually. Optionally, a margin of error can be provided using `fuzz`

Expand All @@ -441,7 +443,7 @@ ___

**compareNumber**(img1: * [MagickFile](interfaces/magickfile.md) &#124; `string`*, img2: * [MagickFile](interfaces/magickfile.md) &#124; `string`*): `Promise`<`number`>

*Defined in [util/imageCompare.ts:11](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/util/imageCompare.ts#L11)*
*Defined in [util/imageCompare.ts:11](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/util/imageCompare.ts#L11)*

**Parameters:**

Expand All @@ -459,7 +461,7 @@ ___

**createImageHome**(): `ImageHomeImpl`

*Defined in [imageHome.ts:81](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/imageHome.ts#L81)*
*Defined in [imageHome.ts:81](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/imageHome.ts#L81)*

**Returns:** `ImageHomeImpl`

Expand All @@ -470,7 +472,7 @@ ___

**execute**(configOrCommand: * [ExecuteConfig](interfaces/executeconfig.md) &#124; [ExecuteCommand](#executecommand)*): `Promise`<[ExecuteResult](interfaces/executeresult.md)>

*Defined in [execute.ts:159](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/execute.ts#L159)*
*Defined in [execute.ts:162](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/execute.ts#L162)*

Execute all commands in given config serially in order. Output files from a command become available as input files in next commands. In the following example we execute two commands. Notice how the second one uses `image2.png` which was the output file of the first one:

Expand Down Expand Up @@ -509,7 +511,7 @@ ___

**executeAndReturnOutputFile**(configOrCommand: * [ExecuteConfig](interfaces/executeconfig.md) &#124; [ExecuteCommand](#executecommand)*, outputFileName?: *`string`*): `Promise`< [MagickOutputFile](interfaces/magickoutputfile.md) &#124; `undefined`>

*Defined in [execute.ts:104](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/execute.ts#L104)*
*Defined in [execute.ts:107](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/execute.ts#L107)*

`execute()` shortcut that useful for commands that return only one output file or when only one particular output file is relevant.

Expand All @@ -531,7 +533,7 @@ ___

**executeOne**(configOrCommand: * [ExecuteConfig](interfaces/executeconfig.md) &#124; [ExecuteCommand](#executecommand)*): `Promise`<[ExecuteResultOne](interfaces/executeresultone.md)>

*Defined in [execute.ts:59](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/execute.ts#L59)*
*Defined in [execute.ts:59](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/execute.ts#L59)*

Execute first command in given config.

Expand All @@ -550,7 +552,7 @@ ___

**extractInfo**(img: * [MagickFile](interfaces/magickfile.md) &#124; `string`*): `Promise`<`ExtractInfoResult`[]>

*Defined in [util/imageExtractInfo.ts:8](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/util/imageExtractInfo.ts#L8)*
*Defined in [util/imageExtractInfo.ts:8](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/util/imageExtractInfo.ts#L8)*

Execute `convert $IMG info.json` to extract image metadata. Returns the parsed info.json file contents

Expand All @@ -569,7 +571,7 @@ ___

**getBuiltInImages**(): `Promise`<[MagickInputFile](interfaces/magickinputfile.md)[]>

*Defined in [util/imageBuiltIn.ts:10](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/util/imageBuiltIn.ts#L10)*
*Defined in [util/imageBuiltIn.ts:10](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/util/imageBuiltIn.ts#L10)*

Gets ImageMagick built-in images like `rose:`, `logo:`, etc in the form of [MagickInputFile](interfaces/magickinputfile.md)s

Expand All @@ -582,7 +584,7 @@ ___

**getFileName**(url: *`string`*): `string`

*Defined in [util/file.ts:78](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/util/file.ts#L78)*
*Defined in [util/file.ts:78](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/util/file.ts#L78)*

**Parameters:**

Expand All @@ -599,7 +601,7 @@ ___

**getFileNameExtension**(filePathOrUrl: *`string`*): `string`

*Defined in [util/file.ts:90](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/util/file.ts#L90)*
*Defined in [util/file.ts:90](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/util/file.ts#L90)*

**Parameters:**

Expand All @@ -616,7 +618,7 @@ ___

**getInputFilesFromHtmlInputElement**(el: *`HTMLInputElement`*): `Promise`<[MagickInputFile](interfaces/magickinputfile.md)[]>

*Defined in [util/html.ts:35](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/util/html.ts#L35)*
*Defined in [util/html.ts:35](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/util/html.ts#L35)*

Build `MagickInputFile[]` from given HTMLInputElement of type=file that user may used to select several files

Expand All @@ -635,7 +637,7 @@ ___

**isExecuteCommand**(arg: *`any`*): `boolean`

*Defined in [execute.ts:84](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/execute.ts#L84)*
*Defined in [execute.ts:84](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/execute.ts#L84)*

**Parameters:**

Expand All @@ -652,7 +654,7 @@ ___

**loadImageElement**(image: *[MagickFile](interfaces/magickfile.md)*, el: *`HTMLImageElement`*, forceBrowserSupport?: *`boolean`*): `Promise`<`void`>

*Defined in [util/html.ts:12](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/util/html.ts#L12)*
*Defined in [util/html.ts:12](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/util/html.ts#L12)*

Will load given html img element src with the inline image content.

Expand All @@ -673,7 +675,7 @@ ___

**newExecutionContext**(inheritFrom?: *[ExecutionContext](interfaces/executioncontext.md)*): [ExecutionContext](interfaces/executioncontext.md)

*Defined in [executionContext.ts:88](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/executionContext.ts#L88)*
*Defined in [executionContext.ts:88](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/executionContext.ts#L88)*

**Parameters:**

Expand Down
8 changes: 4 additions & 4 deletions apidocs/interfaces/callresult.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The result of calling [call](../#call). Also the base class of results of callin

**● exitCode**: *`number`*

*Defined in [magickApi.ts:51](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/magickApi.ts#L51)*
*Defined in [magickApi.ts:51](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/magickApi.ts#L51)*

Exit code of the command executed. If 0 the command executed successfully, otherwise an error occurred and `stderr` could have some information about what was wrong

Expand All @@ -40,7 +40,7 @@ ___

**● outputFiles**: *[MagickOutputFile](magickoutputfile.md)[]*

*Defined in [magickApi.ts:39](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/magickApi.ts#L39)*
*Defined in [magickApi.ts:39](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/magickApi.ts#L39)*

Output files generated by the command, if any

Expand All @@ -51,7 +51,7 @@ ___

**● stderr**: *`string`[]*

*Defined in [magickApi.ts:47](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/magickApi.ts#L47)*
*Defined in [magickApi.ts:47](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/magickApi.ts#L47)*

Output printed by the command to stderr. If `exitCode != 0` then this property could have some information about the error.

Expand All @@ -62,7 +62,7 @@ ___

**● stdout**: *`string`[]*

*Defined in [magickApi.ts:43](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/magickApi.ts#L43)*
*Defined in [magickApi.ts:43](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/magickApi.ts#L43)*

Output printed by the command to stdout. For example the command `identify rose:` will print useful information to stdout

Expand Down
4 changes: 2 additions & 2 deletions apidocs/interfaces/executeconfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

**● commands**: *[ExecuteCommand](../#executecommand)*

*Defined in [execute.ts:13](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/execute.ts#L13)*
*Defined in [execute.ts:13](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/execute.ts#L13)*

___
<a id="inputfiles"></a>
Expand All @@ -32,7 +32,7 @@ ___

**● inputFiles**: *[MagickInputFile](magickinputfile.md)[]*

*Defined in [execute.ts:10](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/execute.ts#L10)*
*Defined in [execute.ts:10](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/execute.ts#L10)*

___

6 changes: 3 additions & 3 deletions apidocs/interfaces/executeevent.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

**● command**: *[Command](../#command)*

*Defined in [execute.ts:113](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/execute.ts#L113)*
*Defined in [execute.ts:116](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/execute.ts#L116)*

___
<a id="id"></a>
Expand All @@ -33,7 +33,7 @@ ___

**● id**: *`number`*

*Defined in [execute.ts:115](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/execute.ts#L115)*
*Defined in [execute.ts:118](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/execute.ts#L118)*

___
<a id="took"></a>
Expand All @@ -42,7 +42,7 @@ ___

**● took**: *`number`*

*Defined in [execute.ts:114](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/execute.ts#L114)*
*Defined in [execute.ts:117](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/execute.ts#L117)*

___

4 changes: 2 additions & 2 deletions apidocs/interfaces/executelistener.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

**afterExecute**(event: *[ExecuteEvent](executeevent.md)*): `void`

*Defined in [execute.ts:119](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/execute.ts#L119)*
*Defined in [execute.ts:122](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/execute.ts#L122)*

**Parameters:**

Expand All @@ -40,7 +40,7 @@ ___

**beforeExecute**(event: *[ExecuteEvent](executeevent.md)*): `void`

*Defined in [execute.ts:120](https://github.com/KnicKnic/WASM-ImageMagick/blob/a680377/src/execute.ts#L120)*
*Defined in [execute.ts:123](https://github.com/KnicKnic/WASM-ImageMagick/blob/8afda0e/src/execute.ts#L123)*

**Parameters:**

Expand Down
Loading

0 comments on commit 85af9d3

Please sign in to comment.