Skip to content

Commit

Permalink
Merge pull request #164 from TonyBrobston/update-documentation
Browse files Browse the repository at this point in the history
docs: update documentation
  • Loading branch information
TonyBrobston authored Jul 29, 2020
2 parents ebe9fe6 + 1ae49e0 commit 4da2802
Show file tree
Hide file tree
Showing 11 changed files with 92 additions and 65 deletions.
51 changes: 30 additions & 21 deletions docs/interfaces/_types_inputoptions_.inputoptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,66 +12,75 @@

### Properties

* [allowCrossOriginResourceSharing](_types_inputoptions_.inputoptions.md#optional-allowcrossoriginresourcesharing)
* [maxHeight](_types_inputoptions_.inputoptions.md#optional-maxheight)
* [maxWidth](_types_inputoptions_.inputoptions.md#optional-maxwidth)
* [quality](_types_inputoptions_.inputoptions.md#optional-quality)
* [returnOriginalIfCompressedFileIsLarger](_types_inputoptions_.inputoptions.md#optional-returnoriginalifcompressedfileislarger)
* [returnOriginalOnFailure](_types_inputoptions_.inputoptions.md#optional-returnoriginalonfailure)
* [scaleImageBy](_types_inputoptions_.inputoptions.md#optional-scaleimageby)
* [allowCrossOriginResourceSharing](_types_inputoptions_.inputoptions.md#optional-readonly-allowcrossoriginresourcesharing)
* [fixImageOrientation](_types_inputoptions_.inputoptions.md#optional-readonly-fiximageorientation)
* [maxHeight](_types_inputoptions_.inputoptions.md#optional-readonly-maxheight)
* [maxWidth](_types_inputoptions_.inputoptions.md#optional-readonly-maxwidth)
* [quality](_types_inputoptions_.inputoptions.md#optional-readonly-quality)
* [returnOriginalIfCompressedFileIsLarger](_types_inputoptions_.inputoptions.md#optional-readonly-returnoriginalifcompressedfileislarger)
* [returnOriginalOnFailure](_types_inputoptions_.inputoptions.md#optional-readonly-returnoriginalonfailure)
* [scaleImageBy](_types_inputoptions_.inputoptions.md#optional-readonly-scaleimageby)

## Properties

### `Optional` allowCrossOriginResourceSharing
### `Optional` `Readonly` allowCrossOriginResourceSharing

**allowCrossOriginResourceSharing**? : *undefined | false | true*

*Defined in [types/InputOptions.ts:2](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/types/InputOptions.ts#L2)*
*Defined in [types/InputOptions.ts:2](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/types/InputOptions.ts#L2)*

___

### `Optional` maxHeight
### `Optional` `Readonly` fixImageOrientation

**fixImageOrientation**? : *undefined | false | true*

*Defined in [types/InputOptions.ts:3](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/types/InputOptions.ts#L3)*

___

### `Optional` `Readonly` maxHeight

**maxHeight**? : *undefined | number*

*Defined in [types/InputOptions.ts:7](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/types/InputOptions.ts#L7)*
*Defined in [types/InputOptions.ts:8](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/types/InputOptions.ts#L8)*

___

### `Optional` maxWidth
### `Optional` `Readonly` maxWidth

**maxWidth**? : *undefined | number*

*Defined in [types/InputOptions.ts:8](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/types/InputOptions.ts#L8)*
*Defined in [types/InputOptions.ts:9](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/types/InputOptions.ts#L9)*

___

### `Optional` quality
### `Optional` `Readonly` quality

**quality**? : *undefined | number*

*Defined in [types/InputOptions.ts:3](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/types/InputOptions.ts#L3)*
*Defined in [types/InputOptions.ts:4](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/types/InputOptions.ts#L4)*

___

### `Optional` returnOriginalIfCompressedFileIsLarger
### `Optional` `Readonly` returnOriginalIfCompressedFileIsLarger

**returnOriginalIfCompressedFileIsLarger**? : *undefined | false | true*

*Defined in [types/InputOptions.ts:5](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/types/InputOptions.ts#L5)*
*Defined in [types/InputOptions.ts:6](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/types/InputOptions.ts#L6)*

___

### `Optional` returnOriginalOnFailure
### `Optional` `Readonly` returnOriginalOnFailure

**returnOriginalOnFailure**? : *undefined | false | true*

*Defined in [types/InputOptions.ts:4](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/types/InputOptions.ts#L4)*
*Defined in [types/InputOptions.ts:5](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/types/InputOptions.ts#L5)*

___

### `Optional` scaleImageBy
### `Optional` `Readonly` scaleImageBy

**scaleImageBy**? : *undefined | number*

*Defined in [types/InputOptions.ts:6](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/types/InputOptions.ts#L6)*
*Defined in [types/InputOptions.ts:7](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/types/InputOptions.ts#L7)*
47 changes: 29 additions & 18 deletions docs/interfaces/_types_options_.options.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
### Properties

* [allowCrossOriginResourceSharing](_types_options_.options.md#readonly-allowcrossoriginresourcesharing)
* [maxHeight](_types_options_.options.md#optional-maxheight)
* [maxWidth](_types_options_.options.md#optional-maxwidth)
* [fixImageOrientation](_types_options_.options.md#readonly-fiximageorientation)
* [maxHeight](_types_options_.options.md#optional-readonly-maxheight)
* [maxWidth](_types_options_.options.md#optional-readonly-maxwidth)
* [quality](_types_options_.options.md#readonly-quality)
* [returnOriginalIfCompressedFileIsLarger](_types_options_.options.md#readonly-returnoriginalifcompressedfileislarger)
* [returnOriginalOnFailure](_types_options_.options.md#readonly-returnoriginalonfailure)
Expand All @@ -26,66 +27,76 @@

**allowCrossOriginResourceSharing**: *boolean*

*Overrides [InputOptions](_types_inputoptions_.inputoptions.md).[allowCrossOriginResourceSharing](_types_inputoptions_.inputoptions.md#optional-allowcrossoriginresourcesharing)*
*Overrides [InputOptions](_types_inputoptions_.inputoptions.md).[allowCrossOriginResourceSharing](_types_inputoptions_.inputoptions.md#optional-readonly-allowcrossoriginresourcesharing)*

*Defined in [types/Options.ts:4](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/types/Options.ts#L4)*
*Defined in [types/Options.ts:4](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/types/Options.ts#L4)*

___

### `Optional` maxHeight
### `Readonly` fixImageOrientation

**fixImageOrientation**: *boolean*

*Overrides [InputOptions](_types_inputoptions_.inputoptions.md).[fixImageOrientation](_types_inputoptions_.inputoptions.md#optional-readonly-fiximageorientation)*

*Defined in [types/Options.ts:5](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/types/Options.ts#L5)*

___

### `Optional` `Readonly` maxHeight

**maxHeight**? : *undefined | number*

*Inherited from [InputOptions](_types_inputoptions_.inputoptions.md).[maxHeight](_types_inputoptions_.inputoptions.md#optional-maxheight)*
*Inherited from [InputOptions](_types_inputoptions_.inputoptions.md).[maxHeight](_types_inputoptions_.inputoptions.md#optional-readonly-maxheight)*

*Defined in [types/InputOptions.ts:7](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/types/InputOptions.ts#L7)*
*Defined in [types/InputOptions.ts:8](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/types/InputOptions.ts#L8)*

___

### `Optional` maxWidth
### `Optional` `Readonly` maxWidth

**maxWidth**? : *undefined | number*

*Inherited from [InputOptions](_types_inputoptions_.inputoptions.md).[maxWidth](_types_inputoptions_.inputoptions.md#optional-maxwidth)*
*Inherited from [InputOptions](_types_inputoptions_.inputoptions.md).[maxWidth](_types_inputoptions_.inputoptions.md#optional-readonly-maxwidth)*

*Defined in [types/InputOptions.ts:8](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/types/InputOptions.ts#L8)*
*Defined in [types/InputOptions.ts:9](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/types/InputOptions.ts#L9)*

___

### `Readonly` quality

**quality**: *number*

*Overrides [InputOptions](_types_inputoptions_.inputoptions.md).[quality](_types_inputoptions_.inputoptions.md#optional-quality)*
*Overrides [InputOptions](_types_inputoptions_.inputoptions.md).[quality](_types_inputoptions_.inputoptions.md#optional-readonly-quality)*

*Defined in [types/Options.ts:5](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/types/Options.ts#L5)*
*Defined in [types/Options.ts:6](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/types/Options.ts#L6)*

___

### `Readonly` returnOriginalIfCompressedFileIsLarger

**returnOriginalIfCompressedFileIsLarger**: *boolean*

*Overrides [InputOptions](_types_inputoptions_.inputoptions.md).[returnOriginalIfCompressedFileIsLarger](_types_inputoptions_.inputoptions.md#optional-returnoriginalifcompressedfileislarger)*
*Overrides [InputOptions](_types_inputoptions_.inputoptions.md).[returnOriginalIfCompressedFileIsLarger](_types_inputoptions_.inputoptions.md#optional-readonly-returnoriginalifcompressedfileislarger)*

*Defined in [types/Options.ts:7](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/types/Options.ts#L7)*
*Defined in [types/Options.ts:8](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/types/Options.ts#L8)*

___

### `Readonly` returnOriginalOnFailure

**returnOriginalOnFailure**: *boolean*

*Overrides [InputOptions](_types_inputoptions_.inputoptions.md).[returnOriginalOnFailure](_types_inputoptions_.inputoptions.md#optional-returnoriginalonfailure)*
*Overrides [InputOptions](_types_inputoptions_.inputoptions.md).[returnOriginalOnFailure](_types_inputoptions_.inputoptions.md#optional-readonly-returnoriginalonfailure)*

*Defined in [types/Options.ts:6](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/types/Options.ts#L6)*
*Defined in [types/Options.ts:7](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/types/Options.ts#L7)*

___

### `Readonly` scaleImageBy

**scaleImageBy**: *number*

*Overrides [InputOptions](_types_inputoptions_.inputoptions.md).[scaleImageBy](_types_inputoptions_.inputoptions.md#optional-scaleimageby)*
*Overrides [InputOptions](_types_inputoptions_.inputoptions.md).[scaleImageBy](_types_inputoptions_.inputoptions.md#optional-readonly-scaleimageby)*

*Defined in [types/Options.ts:8](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/types/Options.ts#L8)*
*Defined in [types/Options.ts:9](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/types/Options.ts#L9)*
4 changes: 2 additions & 2 deletions docs/modules/_index_.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@

**determineOrientation**: *[determineOrientation](_services_exifservice_.md#const-determineorientation)* = exifService.determineOrientation

*Defined in [index.ts:30](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/index.ts#L30)*
*Defined in [index.ts:30](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/index.ts#L30)*

## Functions

### `Const` compress

**compress**(`file`: File, `inputOptions`: [InputOptions](../interfaces/_types_inputoptions_.inputoptions.md)): *Promise‹File | Blob›*

*Defined in [index.ts:8](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/index.ts#L8)*
*Defined in [index.ts:8](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/index.ts#L8)*

**Parameters:**

Expand Down
23 changes: 15 additions & 8 deletions docs/modules/_services_canvasservice_.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

**correctExifRotation**(`context`: CanvasTransform, `orientation`: number, `height`: number, `width`: number): *void*

*Defined in [services/canvasService.ts:14](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/services/canvasService.ts#L14)*
*Defined in [services/canvasService.ts:20](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/services/canvasService.ts#L20)*

**Parameters:**

Expand All @@ -33,34 +33,41 @@ ___

### `Const` create

**create**(`file`: File, `image`: HTMLImageElement, `scale`: number): *Promise‹HTMLCanvasElement›*
**create**(`file`: File, `image`: HTMLImageElement, `scale`: number, `__namedParameters`: object): *Promise‹HTMLCanvasElement›*

*Defined in [services/canvasService.ts:42](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/services/canvasService.ts#L42)*
*Defined in [services/canvasService.ts:48](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/services/canvasService.ts#L48)*

**Parameters:**

**file**: *File*

**image**: *HTMLImageElement*

**scale**: *number*

**__namedParameters**: *object*

Name | Type |
------ | ------ |
`file` | File |
`image` | HTMLImageElement |
`scale` | number |
`fixImageOrientation` | boolean |

**Returns:** *Promise‹HTMLCanvasElement›*

___

### `Const` setCanvasDimensions

**setCanvasDimensions**(`canvas`: HTMLCanvasElement, `orientation`: number, `scaledHeight`: number, `scaledWidth`: number): *void*
**setCanvasDimensions**(`canvas`: HTMLCanvasElement, `orientation`: number, `fixImageOrientation`: boolean, `scaledHeight`: number, `scaledWidth`: number): *void*

*Defined in [services/canvasService.ts:3](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/services/canvasService.ts#L3)*
*Defined in [services/canvasService.ts:4](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/services/canvasService.ts#L4)*

**Parameters:**

Name | Type |
------ | ------ |
`canvas` | HTMLCanvasElement |
`orientation` | number |
`fixImageOrientation` | boolean |
`scaledHeight` | number |
`scaledWidth` | number |

Expand Down
16 changes: 8 additions & 8 deletions docs/modules/_services_exifservice_.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,55 +24,55 @@

**applicationSegmentOneMarker**: *65505* = 65505

*Defined in [services/exifService.ts:1](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/services/exifService.ts#L1)*
*Defined in [services/exifService.ts:1](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/services/exifService.ts#L1)*

___

### `Const` beginOfExifHeaderMarker

**beginOfExifHeaderMarker**: *1165519206* = 1165519206

*Defined in [services/exifService.ts:2](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/services/exifService.ts#L2)*
*Defined in [services/exifService.ts:2](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/services/exifService.ts#L2)*

___

### `Const` byteOrderMarker

**byteOrderMarker**: *18761* = 18761

*Defined in [services/exifService.ts:3](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/services/exifService.ts#L3)*
*Defined in [services/exifService.ts:3](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/services/exifService.ts#L3)*

___

### `Const` byteStuffingMarker

**byteStuffingMarker**: *65280* = 65280

*Defined in [services/exifService.ts:4](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/services/exifService.ts#L4)*
*Defined in [services/exifService.ts:4](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/services/exifService.ts#L4)*

___

### `Const` orientationMarker

**orientationMarker**: *274* = 274

*Defined in [services/exifService.ts:5](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/services/exifService.ts#L5)*
*Defined in [services/exifService.ts:5](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/services/exifService.ts#L5)*

___

### `Const` startOfFileMarker

**startOfFileMarker**: *65496* = 65496

*Defined in [services/exifService.ts:6](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/services/exifService.ts#L6)*
*Defined in [services/exifService.ts:6](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/services/exifService.ts#L6)*

## Functions

### `Const` determineOrientation

**determineOrientation**(`file`: File): *Promise‹number›*

*Defined in [services/exifService.ts:35](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/services/exifService.ts#L35)*
*Defined in [services/exifService.ts:35](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/services/exifService.ts#L35)*

**Parameters:**

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

**parseBytes**(`dataView`: DataView, `resolve`: function): *void*

*Defined in [services/exifService.ts:8](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/services/exifService.ts#L8)*
*Defined in [services/exifService.ts:8](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/services/exifService.ts#L8)*

**Parameters:**

Expand Down
4 changes: 2 additions & 2 deletions docs/modules/_services_fileservice_.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

**create**(`bytes`: Uint8Array[], `type`: string, `name`: string): *File | Blob*

*Defined in [services/fileService.ts:9](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/services/fileService.ts#L9)*
*Defined in [services/fileService.ts:9](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/services/fileService.ts#L9)*

**Parameters:**

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

**validate**(`file`: File): *boolean*

*Defined in [services/fileService.ts:1](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/services/fileService.ts#L1)*
*Defined in [services/fileService.ts:1](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/services/fileService.ts#L1)*

**Parameters:**

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/_services_imageservice_.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

**create**(`file`: File, `options`: [Options](../interfaces/_types_options_.options.md)): *Promise‹HTMLImageElement›*

*Defined in [services/imageService.ts:3](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/services/imageService.ts#L3)*
*Defined in [services/imageService.ts:3](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/services/imageService.ts#L3)*

**Parameters:**

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/_services_optionservice_.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

**override**(`inputOptions`: [InputOptions](../interfaces/_types_inputoptions_.inputoptions.md)): *[Options](../interfaces/_types_options_.options.md)*

*Defined in [services/optionService.ts:4](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/services/optionService.ts#L4)*
*Defined in [services/optionService.ts:4](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/services/optionService.ts#L4)*

**Parameters:**

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/_services_qualityservice_.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

**toFile**(`file`: File, `canvas`: HTMLCanvasElement, `__namedParameters`: object): *File | Blob*

*Defined in [services/qualityService.ts:5](https://github.com/TonyBrobston/jpegasus/blob/dccdfc0/src/services/qualityService.ts#L5)*
*Defined in [services/qualityService.ts:5](https://github.com/TonyBrobston/jpegasus/blob/ebe9fe6/src/services/qualityService.ts#L5)*

**Parameters:**

Expand Down
Loading

0 comments on commit 4da2802

Please sign in to comment.