Skip to content

Commit

Permalink
convert -> process #637
Browse files Browse the repository at this point in the history
  • Loading branch information
phoddie committed May 4, 2021
1 parent f50a9c6 commit 6877030
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions documentation/commodetto/commodetto.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Commodetto

Copyright 2016-2018 Moddable Tech, Inc.<BR>
Revised: November 26, 2018
Copyright 2016-2021 Moddable Tech, Inc.<BR>
Revised: May 4, 2021

## About This Document

Expand Down Expand Up @@ -930,15 +930,15 @@ let converter = new Convert(Bitmap.RGB565LE, Bitmap.Gray256);

***

#### `convert(src, dst)`
#### `process(src, dst)`

The convert function performs a pixel conversion. The `src` argument is the input pixels in the format specified in the constructor. The input pixels are stored either in an `ArrayBuffer` or a `HostBuffer`. The `dst` argument is where the output pixels will be returned. It must be an `ArrayBuffer`.
The `process` function performs a pixel conversion. The `src` argument is the input pixels in the format specified in the constructor. The input pixels are stored either in an `ArrayBuffer` or a `HostBuffer`. The `dst` argument is where the output pixels will be returned. It must be an `ArrayBuffer`.

```js
converter.convert(inputPixels, outputPixels);
converter.process(inputPixels, outputPixels);
```

The caller of convert is responsible for allocating a large enough output buffer. The `Bitmap.depth` function is useful for this calculation.
The caller of process is responsible for allocating a large enough output buffer. The `Bitmap.depth` function is useful for this calculation.

```js
let outputPixelFormat = Bitmap.Gray256;
Expand Down

0 comments on commit 6877030

Please sign in to comment.